-
Notifications
You must be signed in to change notification settings - Fork 19
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
Conversation
dragomirp
commented
Jan 22, 2025
•
edited
Loading
edited
- Add synchronous node configuration
- Remove on storage remove step down hook
Codecov ReportAttention: Patch coverage is
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. |
@@ -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: |
There was a problem hiding this comment.
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.
tests/integration/test_db.py
Outdated
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"], |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
async with ops_test.fast_forward(): | ||
await ops_test.model.wait_for_idle(apps=[app], status="active") |
There was a problem hiding this comment.
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.
There was a problem hiding this 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).
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" |
There was a problem hiding this comment.
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"], |
There was a problem hiding this comment.
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"], |
There was a problem hiding this comment.
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.
tests/integration/test_db.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!