Skip to content

Commit

Permalink
fix: log appender force issue
Browse files Browse the repository at this point in the history
  • Loading branch information
areyouok committed Jun 25, 2024
1 parent fce07b0 commit 04ed1cd
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,11 @@ public SyncFrame(WriteTask task, long perfStartTime, int count, long bytes) {
@Override
protected FrameCallResult afterForce(Void unused) {
perfCallback.fireTime(PerfConsts.RAFT_D_LOG_SYNC, perfStartTime, count, bytes);
WriteTask head = syncTaskQueueHead;
if (head != null && head.lastIndex <= task.lastIndex) {
syncTaskQueueHead = head.nextNeedSyncTask;
raftStatus.setLastForceLogIndex(head.lastIndex);
raftStatus.getLogForceFinishCondition().signalAll();
while (syncTaskQueueHead != null && syncTaskQueueHead.lastIndex <= task.lastIndex) {
raftStatus.setLastForceLogIndex(syncTaskQueueHead.lastIndex);
syncTaskQueueHead = syncTaskQueueHead.nextNeedSyncTask;
}
raftStatus.getLogForceFinishCondition().signalAll();
return Fiber.frameReturn();
}
}
Expand Down

0 comments on commit 04ed1cd

Please sign in to comment.