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 2021/12/10 09:09:21 UTC

[GitHub] [ratis] ChenSammi commented on a change in pull request #506: RATIS-1408. Add metrics of statemachine read/write timeout count.

ChenSammi commented on a change in pull request #506:
URL: https://github.com/apache/ratis/pull/506#discussion_r766495906



##########
File path: ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
##########
@@ -360,6 +360,16 @@ static int syncTimeoutRetry(RaftProperties properties) {
       static void setSyncTimeoutRetry(RaftProperties properties, int syncTimeoutRetry) {
         setInt(properties::setInt, SYNC_TIMEOUT_RETRY_KEY, syncTimeoutRetry, requireMin(-1));
       }
+
+      String READ_TIMEOUT_KEY = PREFIX + ".read.timeout";
+      TimeDuration READ_TIMEOUT_DEFAULT = TimeDuration.valueOf(1000, TimeUnit.MILLISECONDS);
+      static TimeDuration readTimeout(RaftProperties properties) {
+        return getTimeDuration(properties.getTimeDuration(READ_TIMEOUT_DEFAULT.getUnit()),
+            READ_TIMEOUT_KEY, READ_TIMEOUT_DEFAULT, getDefaultLog());
+      }
+      static void setTimeout(RaftProperties properties, TimeDuration readTimeout) {

Review comment:
       Fixed. Thanks. 




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