rpuch commented on code in PR #1559:
URL: https://github.com/apache/ignite-3/pull/1559#discussion_r1083726707


##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/AbstractPageMemoryMvPartitionStorage.java:
##########
@@ -1018,9 +1016,6 @@ protected List<AutoCloseable> getResourcesToClose() {
         hashIndexes.values().forEach(index -> resources.add(index::close));
         sortedIndexes.values().forEach(index -> resources.add(index::close));
 
-        resources.add(hashIndexes::clear);

Review Comment:
   After thinking a bit, I realized that we still need to clear indices' maps 
on all code paths. So this is how it works now:
   
   1. For a persistent flavor, we always clear the maps on closure because we 
don't need any information about indices when destroying a partition (as 
indices data is baked into partition file, so, when we remove the file, both MV 
data and index data is removed).
   2. For a volatile flavor, when a regular closure happens, we clear the maps 
during the closure
   3. For a volatile flavor, when we destroy a partition, we first close it, 
but postpone purging the maps till the moment when we destroy data physically



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