Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DPE-5827] Synchronous node count configuration #738

Merged
merged 25 commits into from
Feb 12, 2025

Conversation

dragomirp
Copy link
Contributor

@dragomirp dragomirp commented Jan 22, 2025

  • Add synchronous node configuration
  • Remove on storage remove step down hook

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 65.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 71.85%. Comparing base (a5593b1) to head (3efdb67).
Report is 25 commits behind head on dpe-5827-all-sync.

Files with missing lines Patch % Lines
src/cluster.py 55.55% 3 Missing and 1 partial ⚠️
src/charm.py 62.50% 3 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           dpe-5827-all-sync     #738      +/-   ##
=====================================================
- Coverage              71.92%   71.85%   -0.08%     
=====================================================
  Files                     15       15              
  Lines                   3477     3468       -9     
  Branches                 534      532       -2     
=====================================================
- Hits                    2501     2492       -9     
- Misses                   845      846       +1     
+ Partials                 131      130       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -500,52 +497,6 @@ def _on_peer_relation_departed(self, event: RelationDepartedEvent) -> None:
# Update the sync-standby endpoint in the async replication data.
self.async_replication.update_async_replication_data()

def _on_pgdata_storage_detaching(self, _) -> None:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step down seems to cause stuck tests on juju 2 (db and replication). Since now we have means to reinitialise RAFT when stuck, we should be able to remove this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched some comments into logs for debugging.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

["primaries", "replicas"],
["sync_standbys", "replicas"],
["primaries", "sync_standbys"],
["sync_standbys", "sync_standbys"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more replicas by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still test non-default case, IMHO.
It will exist in the wild (due to the performance requirements).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think this is important.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a separate test for async.

Comment on lines +66 to +67
async with ops_test.fast_forward():
await ops_test.model.wait_for_idle(apps=[app], status="active")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing back to what is in main.

@dragomirp dragomirp requested review from a team and removed request for a team February 11, 2025 22:05
@dragomirp dragomirp marked this pull request as ready for review February 11, 2025 22:05
Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, sent ping to @7annaba3l and @delgod due to UI changes (new Juju config option).

Comment on lines +5 to +10
synchronous_node_count:
description: |
Sets the number of synchronous nodes to be maintained in the cluster. Should be
either "all", "majority" or a positive integer value.
type: string
default: "all"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the history: it matches signed spec.

["primaries", "replicas"],
["sync_standbys", "replicas"],
["primaries", "sync_standbys"],
["sync_standbys", "sync_standbys"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still test non-default case, IMHO.
It will exist in the wild (due to the performance requirements).

["primaries", "replicas"],
["sync_standbys", "replicas"],
["primaries", "sync_standbys"],
["sync_standbys", "sync_standbys"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think this is important.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@dragomirp dragomirp merged commit 3efdb67 into dpe-5827-all-sync Feb 12, 2025
82 of 92 checks passed
@dragomirp dragomirp deleted the dpe-5827-all-sync-config branch February 12, 2025 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants