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/10/08 12:45:05 UTC

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

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



##########
File path: ratis-server/src/main/java/org/apache/ratis/server/raftlog/RaftLogBase.java
##########
@@ -394,6 +394,7 @@ public LogEntryProto getEntry(TimeDuration timeout) throws RaftLogIOException, T
       } catch (TimeoutException t) {
         final String err = getName() + ": Timeout readStateMachineData for " + toLogEntryString(logEntry);
         LOG.error(err, t);
+        getRaftLogMetrics().onStateMachineReadTimeout();

Review comment:
       The timeout here is not fixed.  It depends on the heartbeat remaining time.  For example, it could read 10 entires within one heartbeat.  The last entry may only remain a very short time so that it times out.
   
   Counting read-timeout is tricky.

##########
File path: ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLogWorker.java
##########
@@ -464,7 +467,7 @@ long getEndIndex() {
         }
       } else {
         try {
-          // this.entry != entry iff the entry has state machine data
+          // this.entry != entry if the entry has state machine data

Review comment:
       "iff" is correct.  It is a short form of "if and only if".




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