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


##########
modules/transactions/src/testFixtures/java/org/apache/ignite/internal/tx/storage/state/test/TestTxStateStorage.java:
##########
@@ -100,11 +100,31 @@ public void remove(UUID txId) {
     public Cursor<IgniteBiTuple<UUID, TxMeta>> scan() {
         checkFullRebalanceInProgress();
 
-        List<IgniteBiTuple<UUID, TxMeta>> copy = storage.entrySet().stream()
+        Iterator<IgniteBiTuple<UUID, TxMeta>> iterator = 
storage.entrySet().stream()
                 .map(e -> new IgniteBiTuple<>(e.getKey(), e.getValue()))
-                .collect(toList());
+                .collect(toList())
+                .iterator();
 
-        return Cursor.fromIterable(copy);
+        return new Cursor<>() {
+            @Override
+            public void close() {
+                // No-op.
+            }
+
+            @Override
+            public boolean hasNext() {
+                assert fullRebalanceFutureReference.get() == null;

Review Comment:
   Why do we even need 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