sanpwc commented on code in PR #2083:
URL: https://github.com/apache/ignite-3/pull/2083#discussion_r1199141145


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/SortedIndexLocker.java:
##########
@@ -186,21 +151,16 @@ public CompletableFuture<Lock> locksForInsert(UUID txId, 
BinaryRow tableRow, Row
         BinaryTuplePrefix prefix = BinaryTuplePrefix.fromBinaryTuple(key);
 
         // Find next key.
-        Cursor<IndexRow> cursor = storage.scan(prefix, null, 
SortedIndexStorage.GREATER);
+        try (Cursor<IndexRow> cursor = storage.scan(prefix, null, 
SortedIndexStorage.GREATER)) {
+            IndexRow nextRow = cursor.hasNext() ? cursor.next() : null;

Review Comment:
   Thanks!



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