tkalkirill commented on code in PR #1305:
URL: https://github.com/apache/ignite-3/pull/1305#discussion_r1012764384


##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/impl/TestMvTableStorage.java:
##########
@@ -180,33 +151,51 @@ public void destroy() throws StorageException {
     }
 
     @Override
-    public CompletableFuture<Void> startRebalanceMvPartition(int partitionId) {
-        MvPartitionStorage oldPartitionStorage = partitions.get(partitionId);
+    public CompletableFuture<Void> startRebalanceMvPartition(int partitionId) 
throws StorageException {
+        Storages oldStorages = storagesByPartitionId.get(partitionId);
+
+        checkPartitionStoragesExists(oldStorages, partitionId);
 
-        assert oldPartitionStorage != null : "Partition does not exist: " + 
partitionId;
+        if (backupStoragesByPartitionId.putIfAbsent(partitionId, oldStorages) 
== null) {
+            Storages newStorages = new Storages(new 
TestMvPartitionStorage(partitionId));
 
-        if (backupPartitions.putIfAbsent(partitionId, oldPartitionStorage) == 
null) {
-            partitions.put(partitionId, new 
TestMvPartitionStorage(partitionId));
+            oldStorages.hashIndexes.keySet().forEach(indexId -> 
newStorages.hashIndexes.put(

Review Comment:
   I suggest discussing this in person.



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