You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/02/25 03:45:21 UTC

[GitHub] [ratis] captainzmc commented on a change in pull request #611: RATIS-1534. SegmentedRaftLogWorker support async flush

captainzmc commented on a change in pull request #611:
URL: https://github.com/apache/ratis/pull/611#discussion_r814450926



##########
File path: ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
##########
@@ -348,6 +348,17 @@ static void setForceSyncNum(RaftProperties properties, int forceSyncNum) {
       setInt(properties::setInt, FORCE_SYNC_NUM_KEY, forceSyncNum);
     }
 
+
+    String ASYNC_FLUSH_ENABLE_KEY = PREFIX + ".async.flush";

Review comment:
       We can define it to this:
   `String ASYNC_FLUSH_ENABLE_KEY = PREFIX + ".async.flush.enable";`

##########
File path: ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLogWorker.java
##########
@@ -374,6 +385,16 @@ private void flushWrites() throws IOException {
     }
   }
 
+  private void flushToPersistentStore() throws IOException {
+    if (shouldFlush() &&
+            lastFlushTimestamp.elapsedTime().compareTo(TimeDuration.valueOf(3, TimeUnit.SECONDS)) > 0) {

Review comment:
       Can we make this flush interval configurable as well?




-- 
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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org