ibessonov commented on code in PR #1038:
URL: https://github.com/apache/ignite-3/pull/1038#discussion_r957396889


##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/Timestamps.java:
##########
@@ -17,62 +17,72 @@
 
 package org.apache.ignite.internal.storage.pagememory.mv;
 
+import static org.apache.ignite.hlc.HybridTimestamp.HYBRID_TIMESTAMP_SIZE;
+import static org.apache.ignite.internal.pagememory.util.PageUtils.getInt;
 import static org.apache.ignite.internal.pagememory.util.PageUtils.getLong;
+import static org.apache.ignite.internal.pagememory.util.PageUtils.putInt;
 import static org.apache.ignite.internal.pagememory.util.PageUtils.putLong;
 
 import java.nio.ByteBuffer;
-import org.apache.ignite.internal.tx.Timestamp;
+import org.apache.ignite.hlc.HybridTimestamp;
 import org.jetbrains.annotations.Nullable;
 
 /**
- * Code to work with {@link Timestamp}s.
+ * Code to work with {@link HybridTimestamp}s.
  */
 public class Timestamps {
     /**
-     * Reads a {@link Timestamp} value from memory.
+     * Reads a {@link HybridTimestamp} value from memory.
      *
      * @param pageAddr Address where page data starts.
      * @param offset Offset to the timestamp value relative to pageAddr.
      */
-    static @Nullable Timestamp readTimestamp(long pageAddr, int offset) {
-        long nodeId = getLong(pageAddr, offset);
-        long localTimestamp = getLong(pageAddr, offset + Long.BYTES);
+    static @Nullable HybridTimestamp readTimestamp(long pageAddr, int offset) {
+        long physical = getLong(pageAddr, offset);
+        int logical = getInt(pageAddr, offset + Long.BYTES);
 
-        Timestamp timestamp = new Timestamp(localTimestamp, nodeId);
-        if (timestamp.equals(RowVersion.NULL_TIMESTAMP)) {
-            timestamp = null;
+        if (physical == 0L && logical == 0) {

Review Comment:
   Ok, although I don't think it's necessary. Not every 0 deserve a constant :)



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

Reply via email to