sashapolo commented on code in PR #6309:
URL: https://github.com/apache/ignite-3/pull/6309#discussion_r2227954453


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -891,27 +891,37 @@ private CompletableFuture<List<BinaryRow>> 
retrieveExactEntriesUntilCursorEmpty(
                         )
                 ).cursor();
 
-        var resolutionFuts = new 
ArrayList<CompletableFuture<TimedBinaryRow>>(count);
+        var rows = new ArrayList<BinaryRow>(count);
 
-        while (resolutionFuts.size() < count && cursor.hasNext()) {
+        var resolutionFuts = new 
ArrayList<CompletableFuture<TimedBinaryRow>>();
+
+        while ((rows.size() + resolutionFuts.size()) < count && 
cursor.hasNext()) {
             ReadResult readResult = cursor.next();
-            HybridTimestamp newestCommitTimestamp = 
readResult.newestCommitTimestamp();
 
-            TimedBinaryRow candidate;
-            if (newestCommitTimestamp == null || !readResult.isWriteIntent()) {
-                candidate = null;
+            BinaryRow row = readResult.binaryRow();
+            UUID retrievedResultTxId = readResult.transactionId();
+
+            if (!readResult.isWriteIntent() || (readTimestamp == null && 
txId.equals(retrievedResultTxId))) {
+                if (row != null) {
+                    rows.add(row);

Review Comment:
   Makes sense, I'll rework this part and add a test



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