Skip to content
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

[WIP] Introduce Follower replication #238

Closed
wants to merge 6 commits into from

Conversation

Fullstop000
Copy link
Member

@Fullstop000 Fullstop000 commented May 12, 2019

Implementation

For a rough view, you can see Detail Design part in this doc

The basic implementation points:

  • Two new functions are added to RawNode: remove_imitators and add_imitators.
  • Every node (except Leader) maintains an extra part in ProgressSet for imitators which is used to manage the progress of its imitators.
  • A new field imitators is added to ConfState for just recovery. And the imitators in Snapshot is ignored when applying.

WIP TODOs

  • Solid test cases
  • ReadIndex in an imitator
  • Add API to support that an imitator is able to request logs directly from its connector

Related issues & PRs

#135 #136

Signed-off-by: Fullstop000 <fullstop1005@gmail.com>
Signed-off-by: Fullstop000 <fullstop1005@gmail.com>
Signed-off-by: Fullstop000 <fullstop1005@gmail.com>

# Conflicts:
#	harness/src/interface.rs
#	src/eraftpb.rs
#	src/raft.rs
#	src/raw_node.rs
Signed-off-by: Fullstop000 <fullstop1005@gmail.com>
Signed-off-by: Fullstop000 <fullstop1005@gmail.com>
Signed-off-by: Fullstop000 <fullstop1005@gmail.com>
@Hoverbear
Copy link
Contributor

This is so, so exciting!

@Fullstop000 Fullstop000 deleted the follower_replication branch June 28, 2019 01:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants