ascherbakoff commented on code in PR #4821:
URL: https://github.com/apache/ignite-3/pull/4821#discussion_r1891263758


##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/NodeImpl.java:
##########
@@ -285,8 +289,10 @@ private class LogEntryAndClosureHandler implements 
EventHandler<LogEntryAndClosu
         // task list for batch
         private final List<LogEntryAndClosure> tasks = new 
ArrayList<>(NodeImpl.this.raftOptions.getApplyBatch());
 
+        private @Nullable HybridTimestamp safeTs = null;

Review Comment:
   >Safe time doesn't seem to belong to the Raft protocol
   
   I believe you are wrong.
   safe time is used for one purpose - serializable reading from replicas
   raft has the same concept to ensure replicas is up to date - apply index.
   but we can't use commit index directly, because it is not associated with 
timestamp.
   so we just extend the protocol to assign the entry with motononic growing 
timestamp in addition to apply index, which is done in the safe way when an 
entry enters raft pipeline.
   other protocols (like Hermes for example) don't require safe timestamp, so 
it is marked as Nullable in command interface.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to