szetszwo commented on a change in pull request #508:
URL: https://github.com/apache/ratis/pull/508#discussion_r718358122
##########
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:
Precision is the main reason.
Also, double is the default in Java. For example, the code below does not
compile.
```
float a = 1.2;
```
Using float is easier to make mistakes unawarely.
Unless space is an issue, we should just use double.
--
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]