-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Raft stability #2111
Raft stability #2111
Changes from all commits
057309f
3d03602
27f4a3e
55768e6
189aaa0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,10 +28,6 @@ var ( | |
// ErrOutOfDateLog is returned when a candidate's log is not up to date. | ||
ErrOutOfDateLog = errors.New("out of date log") | ||
|
||
// ErrUncommittedIndex is returned when a stream is started from an | ||
// uncommitted log index. | ||
ErrUncommittedIndex = errors.New("uncommitted index") | ||
|
||
// ErrAlreadyVoted is returned when a vote has already been cast for | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can't happen anymore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the stream starts from the highest available index on the leader and the follower will trim its log or re-request a snapshot if needed. |
||
// a different candidate in the same election term. | ||
ErrAlreadyVoted = errors.New("already voted") | ||
|
@@ -50,4 +46,14 @@ var ( | |
|
||
// ErrDuplicateNodeURL is returned when adding a node with an existing URL. | ||
ErrDuplicateNodeURL = errors.New("duplicate node url") | ||
|
||
// ErrSnapshotRequired returned when reading from an out-of-order log. | ||
// The snapshot will be retrieved on the next reader request. | ||
ErrSnapshotRequired = errors.New("snapshot required") | ||
) | ||
|
||
// Internal marker errors. | ||
var ( | ||
errClosing = errors.New("closing marker") | ||
errTransitioning = errors.New("transitioning marker") | ||
) |
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.
Minor: describe what the returned
int64
is?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.
It's the number of bytes read but we're not supporting it. It's just an implementation of the
io.ReaderFrom
interface. We return an error for any partial reads.