Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit56ed20a

Browse files
committed
Prevent Raft followers from applying entries which they have not received yet.
1 parent1552662 commit56ed20a

File tree

1 file changed

+1
-1
lines changed
  • contrib/raftable/raft/src

1 file changed

+1
-1
lines changed

‎contrib/raftable/raft/src/raft.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ bool raft_peer_up(raft_t r, int id, char *host, int port, bool self) {
320320
staticintraft_apply(raft_traft) {
321321
intapplied_now=0;
322322
raft_log_t*l=&raft->log;
323-
while (l->applied<l->acked) {
323+
while ((l->applied<l->acked)&& (l->applied <=RAFT_LOG_LAST_INDEX(raft))) {
324324
raft_entry_t*e=&RAFT_LOG(raft,l->applied);
325325
assert(e->update.len==e->bytes);
326326
raft->config.applier(raft->config.userdata,e->update, false);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp