make NODES=3 NODES_ASYNC=2 NODES_PRIOS=50,0 NODES_SYNC_SB=0 cluster#551
Merged
make NODES=3 NODES_ASYNC=2 NODES_PRIOS=50,0 NODES_SYNC_SB=0 cluster#551
Conversation
72ca9d5 to
15b65b1
Compare
JelteF
suggested changes
Dec 18, 2020
| options->root, | ||
| firstNode, | ||
| NodeStateToString(PRIMARY_STATE)); | ||
| NodeStateToString(WAIT_PRIMARY_STATE)); |
Contributor
There was a problem hiding this comment.
Because of this change I now get this error when running this command:
make -j20 NODES=6 NODES_SYNC_SB=5 cluster
13:53:15 11041 ERROR Monitor ERROR: invalid value for number_sync_standbys: "5"
13:53:15 11041 ERROR Monitor DETAIL: At least 6 standby nodes are required, and only 2 are currently participating in the replication quorum
13:53:15 11041 ERROR SQL query: SELECT pgautofailover.set_formation_number_sync_standbys($1, $2)
13:53:15 11041 ERROR SQL params: 'default', '5'
13:53:15 11041 ERROR Failed to update number-sync-standbys for formation "default".
13:53:15 11041 ERROR Failed to set "number-sync-standbys" to "5".
Collaborator
Author
There was a problem hiding this comment.
Without this change we can't make -j20 NODES=3 NODES_SYNC_SB=0 NODES_ASYNC=3 cluster if I remember correctly... maybe we need to be smarter about what we want to wait for?
Collaborator
Author
There was a problem hiding this comment.
So, even when waiting until primary, you can't have number-sync-standbys set to 5 with... 5 standby nodes (NODES=6, total). Still, we need to wait for primary when the target number-sync-standbys setting is one or more, now fixed.
This PR allows to setup an interactive testing/QA cluster with tmux with full specifications of nodes replication settings. Before that the code was conflating the replicationQuorum and the candidatePriority of nodes, and that was limiting our testing abilities. When unspecified, nodes are all created with --candidate-priority 0. Then it is possible to specify one or more candidate priorities, which are used in the order given. When more nodes are created than priorities are given, we use the last specified priority again and again. For instance --node-priorities 50,0 --nodes 3 results in using 50,0,0 as the respective priorities for the nodes thus created.
15b65b1 to
bc37092
Compare
JelteF
approved these changes
Jan 15, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR allows to setup an interactive testing/QA cluster with tmux with
full specifications of nodes replication settings. Before that the code was
conflating the replicationQuorum and the candidatePriority of nodes, and
that was limiting our testing abilities.
When unspecified, nodes are all created with
--candidate-priority 0. Then itis possible to specify one or more candidate priorities, which are used in
the order given. When more nodes are created than priorities are given, we
use the last specified priority again and again.
For instance
--node-priorities 50,0 --nodes 3results in using 50,0,0 as therespective priorities for the nodes thus created.