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


##########
modules/storage-rocksdb/src/main/java/org/apache/ignite/internal/storage/rocksdb/RocksDbMvPartitionStorage.java:
##########
@@ -853,24 +859,22 @@ protected ReadResult decodeEntry(byte[] key, byte[] 
value) {
 
                 @Override
                 public boolean hasNext() {
-                    return busy(() -> {
-                        
throwExceptionIfStorageInProgressOfRebalance(state.get(), 
RocksDbMvPartitionStorage.this::createStorageInfo);
+                    assert rowIsLocked(rowId);
 
-                        return super.hasNext();
-                    });
+                    return super.hasNext();
                 }
 
                 @Override
                 public ReadResult next() {
-                    return busy(() -> {
-                        
throwExceptionIfStorageInProgressOfRebalance(state.get(), 
RocksDbMvPartitionStorage.this::createStorageInfo);
+                    assert rowIsLocked(rowId);
 
-                        return super.next();
-                    });
+                    return super.next();
                 }
 
                 @Override
                 public void close() {
+                    assert rowIsLocked(rowId);

Review Comment:
   This assertion is for commenting purposes and for other developers to catch 
problems if they use cursors in unintended ways.
   This particular assertion should never happen in production environment, 
because it only depends on code structure, there's no data dependency. Thus we 
can be sure about it



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