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


##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryTableStorage.java:
##########
@@ -96,49 +98,22 @@ public boolean isVolatile() {
 
     @Override
     protected void finishDestruction() {
-        dataRegion.pageMemory().onGroupDestroyed(tableCfg.tableId().value());
+        
dataRegion.pageMemory().onGroupDestroyed(tableConfig.tableId().value());
     }
 
     @Override
     public PersistentPageMemoryMvPartitionStorage createMvPartitionStorage(int 
partitionId) {
-        CompletableFuture<Void> partitionDestroyFuture = 
partitionIdDestroyFutureMap.get(partitionId);
+        waitPartitionToBeDestroyed(partitionId);
 
-        if (partitionDestroyFuture != null) {
-            try {
-                // Time is chosen randomly (long enough) so as not to call 
#join().
-                partitionDestroyFuture.get(10, TimeUnit.SECONDS);
-            } catch (Exception e) {
-                throw new StorageException("Error waiting for the destruction 
of the previous version of the partition: " + partitionId, e);
-            }
-        }
+        TableView tableView = tableConfig.value();
 
-        TableView tableView = tableCfg.value();
+        GroupPartitionId groupPartitionId = 
createGroupPartitionId(partitionId);
 
-        GroupPartitionId groupPartitionId = new 
GroupPartitionId(tableView.tableId(), partitionId);
+        PartitionMeta meta = 
getOrCreatePartitionMetaWithRecreatePartitionPageStoreIfRebalanceNotCompleted(groupPartitionId);

Review Comment:
   I didn't put it in a separate lock block, but moved it outside of it.
   This is not an error since we are reading the `PartitionMeta` directly from 
the file, not using `PageMemory`.



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