xtern commented on code in PR #4929:
URL: https://github.com/apache/ignite-3/pull/4929#discussion_r1895532379


##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientInboundMessageHandler.java:
##########
@@ -993,9 +1024,11 @@ private long observableTimestamp(@Nullable 
ClientMessagePacker out) {
             if (meta instanceof HybridTimestamp) {
                 return ((HybridTimestamp) meta).longValue();
             }
+        } else {
+            return clockService.currentLong();
         }
 
-        return clockService.currentLong();
+        return HybridTimestamp.MIN_VALUE.longValue();
     }

Review Comment:
   I suggest reworking this method a bit to see the code branching more clearly.
   ```java
   private long observableTimestamp(@Nullable ClientMessagePacker out) {
           // Certain operations can override the timestamp and provide it in 
the meta object.
           if (out == null) {
               return clockService.currentLong();
           }
   
           Object meta = out.meta();
   
           if (meta instanceof HybridTimestamp) {
               return ((HybridTimestamp) meta).longValue();
           }
   
           return HybridTimestamp.MIN_VALUE.longValue();
       }
   ```



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