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



##########
File path: 
ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
##########
@@ -119,6 +119,17 @@ static SizeInBytes byteLimit(RaftProperties properties) {
     static void setByteLimit(RaftProperties properties, SizeInBytes byteLimit) 
{
       setSizeInBytes(properties::set, BYTE_LIMIT_KEY, byteLimit, 
requireMin(1L));
     }
+
+    String FOLLOWER_MAX_GAP_RATIO_KEY = PREFIX + ".follower-max-gap-ratio";

Review comment:
       Let's rename it to ".follower.gap.ratio.max".

##########
File path: 
ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
##########
@@ -119,6 +119,17 @@ static SizeInBytes byteLimit(RaftProperties properties) {
     static void setByteLimit(RaftProperties properties, SizeInBytes byteLimit) 
{
       setSizeInBytes(properties::set, BYTE_LIMIT_KEY, byteLimit, 
requireMin(1L));
     }
+
+    String FOLLOWER_MAX_GAP_RATIO_KEY = PREFIX + ".follower-max-gap-ratio";
+    float FOLLOWER_MAX_GAP_RATIO_DEFAULT = 1;

Review comment:
       Let's use double instead of float.  We should avoid using float, 
especially in 64-bit computers.

##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/impl/LeaderStateImpl.java
##########
@@ -269,6 +272,13 @@ boolean removeAll(Collection<LogAppender> c) {
     this.pendingRequests = new PendingRequests(server.getMemberId(), 
properties, raftServerMetrics);
     this.watchRequests = new WatchRequests(server.getMemberId(), properties);
     this.messageStreamRequests = new 
MessageStreamRequests(server.getMemberId());
+    this.maxPendingRequests = 
RaftServerConfigKeys.Write.elementLimit(properties);

Review comment:
       Change maxPendingRequests to a local variable.




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