SammyVimes commented on code in PR #1666:
URL: https://github.com/apache/ignite-3/pull/1666#discussion_r1115513986


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -2181,22 +2181,24 @@ private static PeersAndLearners 
configurationFromAssignments(Collection<Assignme
      */
     // TODO: IGNITE-18619 Maybe we should wait here to create indexes, if you 
add now, then the tests start to hang
     private CompletableFuture<PartitionStorages> 
getOrCreatePartitionStorages(TableImpl table, int partitionId) {
-        return CompletableFuture
-                .supplyAsync(() -> {
-                    MvPartitionStorage mvPartitionStorage = 
table.internalTable().storage().getOrCreateMvPartition(partitionId);
-                    TxStateStorage txStateStorage = 
table.internalTable().txStateStorage().getOrCreateTxStateStorage(partitionId);
+        InternalTable internalTable = table.internalTable();
+
+        MvPartitionStorage mvPartition = 
internalTable.storage().getMvPartition(partitionId);
+
+        return (mvPartition != null ? completedFuture(mvPartition) : 
internalTable.storage().createMvPartition(partitionId))

Review Comment:
   I think we can leave it as it is, but we need a test for this behaviour



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