-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
Indexing:ReplicationIssues and PRs related to core replication framework eg segrepIssues and PRs related to core replication framework eg segrepenhancementEnhancement or improvement to existing feature or requestEnhancement or improvement to existing feature or request
Description
Hello @mikemccand / @mch2, I could like to understand incontext of how shard promotion (Leader Election) works with the below proposals. May why not consider distributed consensus algorithm like RAFT.
- Send a _{n} (n is larger than the largest segment counter in current
SegmentInfos) to master node before segment replication progress so that master can tell the newly promoted Primary Shard not to generate any segment less than _{n}. To reduce the pressure of master node, we don't need to send this information every time. For example, if the max segment is _4.si in primary's currentSegmentInfos, we can send _rw(or 1004 in decimal) to master node. After segment increases to _rw.si, we send _1jo(or 2004 in decimal) to master node.
what happen when master primary shard dies at first inside the cluster and newly prometed primary shard has same segment number and how promotion happens?
- Before choosing a replica doing promotion progress, master node must ask all replicas whose replication state is newest.
Using distributed consensus algorithm like Raft should be the great choice because copying the merged segment and transfer to replicas and support learder election as @mikemccand mentioned in his blog Segment Replication cluster state.
Originally posted by @Jeevananthan-23 in #2212 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Indexing:ReplicationIssues and PRs related to core replication framework eg segrepIssues and PRs related to core replication framework eg segrepenhancementEnhancement or improvement to existing feature or requestEnhancement or improvement to existing feature or request