tkalkirill commented on code in PR #1325:
URL: https://github.com/apache/ignite-3/pull/1325#discussion_r1031374269
##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/PersistentPageMemoryTableStorage.java:
##########
@@ -86,41 +97,29 @@ public PersistentPageMemoryDataRegion dataRegion() {
return dataRegion;
}
- /** {@inheritDoc} */
@Override
public boolean isVolatile() {
return false;
}
- /** {@inheritDoc} */
- @Override
- public void start() throws StorageException {
- super.start();
-
- TableView tableView = tableCfg.value();
-
- try {
- dataRegion.filePageStoreManager().initialize(tableView.name(),
tableView.tableId(), tableView.partitions());
-
- int deltaFileCount =
dataRegion.filePageStoreManager().getStores(tableView.tableId()).stream()
- .mapToInt(FilePageStore::deltaFileCount)
- .sum();
-
-
dataRegion.checkpointManager().addDeltaFileCountForCompaction(deltaFileCount);
- } catch (IgniteInternalCheckedException e) {
- throw new StorageException("Error initializing file page stores
for table: " + tableView.name(), e);
- }
- }
-
- /** {@inheritDoc} */
@Override
public void destroy() throws StorageException {
close(true);
}
- /** {@inheritDoc} */
@Override
public PersistentPageMemoryMvPartitionStorage createMvPartitionStorage(int
partitionId) {
+ CompletableFuture<Void> partitionDestroyFuture =
destroyFutureByPartitionId.get(partitionId);
+
+ if (partitionDestroyFuture != null) {
+ try {
+ // Time is chosen randomly (long enough) so as not to call
#join().
+ partitionDestroyFuture.get(10, TimeUnit.SECONDS);
Review Comment:
Tried to fix 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]