vldpyatkov commented on code in PR #3069:
URL: https://github.com/apache/ignite-3/pull/3069#discussion_r1466781286


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/storage/InternalTableImpl.java:
##########
@@ -1459,7 +1461,39 @@ private Publisher<BinaryRow> scan(
                     return replicaSvc.invoke(recipient.node(), request);
                 },
                 // TODO: IGNITE-17666 Close cursor tx finish.
-                (unused, fut) -> fut);
+                (unused, fut) -> fut.thenApply(cursorId -> null));
+    }
+
+    /**
+     * Closes the cursor on server side.
+     *
+     * @param txId Transaction id.
+     * @param replicaGrpId Replication group id.
+     * @param scanIdFut Future to scan id.
+     * @param recipientNode Server node where the scan was started.
+     * @param commit Commit flag, when the flag is {@code null} the scan was 
closed manually.
+     * @return The future.
+     */
+    private CompletableFuture<Void> onScanComplete(
+            UUID txId,
+            ReplicationGroupId replicaGrpId,
+            CompletableFuture<Long> scanIdFut,
+            ClusterNode recipientNode,
+            Boolean commit
+    ) {
+        return scanIdFut.thenCompose(scanId -> {
+            if (commit) {

Review Comment:
   I changed the flag to `boolean`, the documentation is outdated.



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