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


##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java:
##########
@@ -1040,17 +1041,18 @@ private void sendAwaitReplicaResponse(String 
senderConsistentId, long correlatio
     /**
      * Prepares replica response.
      */
-    private NetworkMessage prepareReplicaResponse(boolean sendTimestamp, 
Object result) {
+    private NetworkMessage prepareReplicaResponse(boolean sendTimestamp, 
ReplicaResult result) {
         if (sendTimestamp) {
+            HybridTimestamp commitTs = 
result.applyResult().getCommitTimestamp();
             return REPLICA_MESSAGES_FACTORY
                     .timestampAwareReplicaResponse()
-                    .result(result)
-                    .timestamp(clockService.now())
+                    .result(result.result())
+                    .timestamp(commitTs == null ? clockService.current() : 
commitTs)

Review Comment:
   It's enough for transaction ordering purpose of HLC. Due to bounded clock 
skew requirement, we will never have too stale new timestamps.



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