szetszwo commented on a change in pull request #572:
URL: https://github.com/apache/ratis/pull/572#discussion_r776184511



##########
File path: 
ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
##########
@@ -433,6 +433,18 @@ static void setAutoTriggerEnabled(RaftProperties 
properties, boolean autoTrigger
       setBoolean(properties::setBoolean, AUTO_TRIGGER_ENABLED_KEY, 
autoTriggerThreshold);
     }
 
+    /** min gap to take snapshot async */
+    String MIN_GAP_TAKE_SNAPSHOT_KEY = PREFIX + ".min.gap.takeSnapshot";
+    long MIN_GAP_TAKE_SNAPSHOT_DEFAULT = 5;

Review comment:
       The default should be larger.  How about 1024?

##########
File path: 
ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
##########
@@ -433,6 +433,18 @@ static void setAutoTriggerEnabled(RaftProperties 
properties, boolean autoTrigger
       setBoolean(properties::setBoolean, AUTO_TRIGGER_ENABLED_KEY, 
autoTriggerThreshold);
     }
 
+    /** min gap to take snapshot async */
+    String MIN_GAP_TAKE_SNAPSHOT_KEY = PREFIX + ".min.gap.takeSnapshot";
+    long MIN_GAP_TAKE_SNAPSHOT_DEFAULT = 5;
+    static long minGapTakeSnapshot(RaftProperties properties) {
+      return getLong(
+          properties::getLong, MIN_GAP_TAKE_SNAPSHOT_KEY, 
MIN_GAP_TAKE_SNAPSHOT_DEFAULT,
+          getDefaultLog(), requireMin(5L));

Review comment:
       The min should be 1L.

##########
File path: 
ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
##########
@@ -433,6 +433,18 @@ static void setAutoTriggerEnabled(RaftProperties 
properties, boolean autoTrigger
       setBoolean(properties::setBoolean, AUTO_TRIGGER_ENABLED_KEY, 
autoTriggerThreshold);
     }
 
+    /** min gap to take snapshot async */
+    String MIN_GAP_TAKE_SNAPSHOT_KEY = PREFIX + ".min.gap.takeSnapshot";

Review comment:
       Let's call it "creation.gap".
   




-- 
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]


Reply via email to