-
Notifications
You must be signed in to change notification settings - Fork 7
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
Replicator documentation #91
base: main
Are you sure you want to change the base?
Conversation
/// Change the replicator role. | ||
/// | ||
/// Remarks: | ||
/// Replicator change_role is called before Replica change_role. |
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.
Is there any broader commentary to offer on the relationship between Replica
and Replicator
?
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.
Replica is for setting up listener for user connections and manage its life cycle.
Replicator is for replication listener and LSN management in the background.
/// Called on primary to inform the set of active secondary replicas that may | ||
/// begin to catchup. Idle secondary replicas are not included here. | ||
/// | ||
/// The total number of replica marked with must_catchup will not exceed the write quorum. |
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.
What is the significance of the must_catchup
flag when provided as true
?
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 think it is only used in graceful swap of primary and secondary. The old primary gets updated with the catch up configuration with all the secondary replicas, must_catch up is set to true for the new candidate primary, so that it must catch up, and wait_for_catchup_quorum should return if the must catch up replica successfully caught up. The other secondaries catch up can lag, and the partition can fix any problem in the background without affect the primary promotion workflow.
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.
If the catchup mode is write, it is upto the replicator to pick a quorum of the replicas that includes the must_catch up replica. Wait_for_catchup_quorum complete can return if the quorum of replica has caught up, and can leave other slow replica still running in background.
e63badb
to
f46d12c
Compare
Add unofficial documentation for replicator apis.