extend commit group to learners - #566
Conversation
Signed-off-by: lance6716 <lance6716@gmail.com> change style Signed-off-by: lance6716 <lance6716@gmail.com> address comment Signed-off-by: lance6716 <lance6716@gmail.com> skip broken CI on windows Signed-off-by: tianyuan <tianyuan@pingcap.cn> try to upgrade protobuf version Signed-off-by: lance6716 <lance6716@gmail.com> rebase try Signed-off-by: lance6716 <lance6716@gmail.com> try Signed-off-by: lance6716 <lance6716@gmail.com> add back windows CI Signed-off-by: lance6716 <lance6716@gmail.com> refine function comment Signed-off-by: tianyuan <tianyuan@pingcap.cn> add a test case Signed-off-by: tianyuan <tianyuan@pingcap.cn> don't change github ci.yml Signed-off-by: tianyuan <tianyuan@pingcap.cn> change impl Signed-off-by: tianyuan <tianyuan@pingcap.cn> address comment Signed-off-by: tianyuan <tianyuan@pingcap.cn> refine comment Signed-off-by: tianyuan <tianyuan@pingcap.cn> refine code Signed-off-by: tianyuan <tianyuan@pingcap.cn> address comment Signed-off-by: tianyuan <tianyuan@pingcap.cn> change behaviour for group ID 0 Signed-off-by: tianyuan <tianyuan@pingcap.cn> refine code Signed-off-by: lance6716 <lance6716@gmail.com>
|
@BusyJay PTAL |
|
I don't see why this feature matters. The point of group commit is to ensure latest changes are replicated to different AZs, so if one AZ is down, the new leader can still have all the changes. So what't the point of considering learner here? |
We only have learners (no voters) in the second AZ. And that learner is a special role like TiFlash, it can't be elected to leaders (It's not like a pre-voter role). The background is very complex and not aimed to be open-source 😂 Do you mind if we have a discussion elsewhere? |
extend commit group to learners. When make sure the group commit rule "raft log should be replicated to at least 2 group", also consider learners.
This feature is used to implement replication across DC by raft learner. Different with existing commit group which check followers, learner has less impact on leader&follower group like a TiFlash replica. It won't affect votes and won't elect itself as leader. Adding commit group for learner can switch between RPO=0 and better performance replication.