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


##########
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/index/RocksDbSortedIndexStorage.java:
##########
@@ -171,14 +172,15 @@ private Cursor<ByteBuffer> createScanCursor(byte 
@Nullable [] lowerBound, byte @
             @Nullable
             private Boolean hasNext;
 
-            @Nullable
-            private byte[] key;
+            private byte @Nullable [] key;
 
             @Override
             public void close() {
-                it.close();
-
-                RocksUtils.closeAll(options, upperBoundSlice);
+                try {
+                    closeAll(it, () -> RocksUtils.closeAll(options, 
upperBoundSlice));

Review Comment:
   Wait a minute, why not `closeAll(it, options, upperBoundSlice)`? What's the 
reason for creating a lambda?



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