Skip to content

Commit

Permalink
Fix bug in statemachine mode (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzh0425 authored Apr 28, 2022
1 parent 103cf0a commit 52c8107
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public DLedgerEntryPusher(DLedgerConfig dLedgerConfig, MemberState memberState,
}
this.entryHandler = new EntryHandler(logger);
this.quorumAckChecker = new QuorumAckChecker(logger);
this.fsmCaller = Optional.empty();
}

public void startup() {
Expand Down Expand Up @@ -372,7 +373,7 @@ public void doWork() {
}

if (ackNum == 0) {
checkResponseFuturesTimeout(quorumIndex);
checkResponseFuturesTimeout(quorumIndex + 1);
waitForRunning(1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public DLedgerServer(DLedgerConfig dLedgerConfig) {
t.setName("DLedgerServer-ScheduledExecutor");
return t;
});
this.fsmCaller = Optional.empty();
}

public void startup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private void doCommitted(final long committedIndex) {
// Check response timeout.
if (iter.getCompleteAckNums() == 0) {
if (this.entryPusher != null) {
this.entryPusher.checkResponseFuturesTimeout(this.lastAppliedIndex.get());
this.entryPusher.checkResponseFuturesTimeout(this.lastAppliedIndex.get() + 1);
}
}
}
Expand Down

0 comments on commit 52c8107

Please sign in to comment.