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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]