xtern commented on a change in pull request #6951: Ignite 11073 12069 P2P Rebalance collaboration work URL: https://github.com/apache/ignite/pull/6951#discussion_r408048392
########## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java ########## @@ -1625,6 +1629,12 @@ private DataEntryRow(DataEntry entry) { /** */ private final CountDownLatch latch = new CountDownLatch(1); + /** Currently used data storage state. */ + private final AtomicBoolean active = new AtomicBoolean(true); Review comment: Any "lazy" method (which is not initialize the GridCacheDataStore) can be called. We only need to verify that the partition file does not exist when we start “swap” operation (i.e. partition disabling), and prevent any method that could initialize the GridCacheDataStore from being executed until we “swap” file. More detailed: GridCacheDataStore have "lazy" initialization, it is instantiated without creating underlying partition file (the "exists" flag indicates whether the partition file existed at the time of GridCacheDataStore creation). Each method of GridCacheDataStore can initialize GridCacheDataStore when file exists (see init(true)) but only a part of them can create partition file (see init(false)). The main goal is to prevent initialization of GirdCacheDataStore before the partition file was preloaded from another node. The only guarantee in current implementation is the assertion which checks that when we "disabling" partition - file does not exists. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services