SammyVimes commented on code in PR #1102:
URL: https://github.com/apache/ignite-3/pull/1102#discussion_r974576720


##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/AbstractPageMemoryMvPartitionStorage.java:
##########
@@ -280,38 +305,65 @@ private void throwIfChainBelongsToAnotherTx(VersionChain 
versionChain, UUID txId
         assert transactionId != null ^ timestamp != null;
 
         if (transactionId != null) {
-            return findLatestRowVersion(versionChain, transactionId, 
keyFilter);
+            ReadResult res = findLatestRowVersion(versionChain, transactionId, 
keyFilter);
+
+            if (res == null) {
+                return null;
+            }
+
+            return res.binaryRow();
         } else {
-            ByteBufferRow row = findRowVersionByTimestamp(versionChain, 
timestamp);
+            ReadResult res = findRowVersionByTimestamp(versionChain, 
timestamp);
+
+            if (res == null) {
+                return null;
+            }
+
+            BinaryRow row = res.binaryRow();
 
             return keyFilter.test(row) ? row : null;
         }
     }
 
-    private @Nullable ByteBufferRow findRowVersionByTimestamp(VersionChain 
versionChain, HybridTimestamp timestamp) {
-        if (!versionChain.hasCommittedVersions()) {
-            return null;
-        }
-
-        long newestCommittedLink = versionChain.newestCommittedLink();
+    private @Nullable ReadResult findRowVersionByTimestamp(VersionChain 
versionChain, HybridTimestamp timestamp) {
+        long headLink = versionChain.headLink();
 
         ScanVersionChainByTimestamp scanByTimestamp = new 
ScanVersionChainByTimestamp(partitionId);
 
         try {
-            rowVersionDataPageReader.traverse(newestCommittedLink, 
scanByTimestamp, timestamp);
+            rowVersionDataPageReader.traverse(headLink, scanByTimestamp, 
timestamp);

Review Comment:
   I don't follow)
   



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