SincereXIA commented on a change in pull request #616:
URL: https://github.com/apache/ratis/pull/616#discussion_r820013916
##########
File path:
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLogWorker.java
##########
@@ -355,7 +356,7 @@ private boolean shouldFlush() {
} else if (pendingFlushNum >= forceSyncNum) {
return true;
}
- return pendingFlushNum > 0 && queue.isEmpty() &&
lastFlush.elapsedTime().compareTo(flushIntervalMin) > 0;
Review comment:
> @SincereXIA , We already have raft.server.log.flush.interval.min . Do
you mean adding another flush interval?
In my test, I found that add flush interval in this way has bug, It will
greatly reduce the submission speed of Raft log. So I had to remove it.
So affter use this pr, I can't increase the flush interval.
I figured out a way to increase the flush interval:
https://github.com/SincereXIA/ratis/commit/118b2e5ec5339b2fb105c29e738c066644112d59
It add a sleep in async flush call task, and it will not block the main
thread. But after I increased the flush interval by this method, the
performance did not improve. So I didn't add this commit to this pr. I haven't
been able to think of a better way to do it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]