Mmuzaf commented on a change in pull request #9317:
URL: https://github.com/apache/ignite/pull/9317#discussion_r692419854



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
##########
@@ -1546,6 +1498,11 @@ public CacheDataStoreImpl(
             mvccUpdateMarker = new MvccMarkUpdatedHandler(grp);
             mvccUpdateTxStateHint = new MvccUpdateTxStateHintHandler(grp);
             mvccApplyChanges = new MvccApplyChangesHandler(grp);
+
+            if (cleaner == null)

Review comment:
       This is done for lazy cache data store initaliztion. Currently, if the 
page store exists it will trigger the initialization of the cache data store, 
however, it's not required on partition creation.

##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
##########
@@ -1280,22 +1239,21 @@ private long allocateForTree() throws 
IgniteCheckedException {
 
     /** {@inheritDoc} */
     @Override public final CacheDataStore createCacheDataStore(int p) throws 
IgniteCheckedException {
-        CacheDataStore dataStore;
-
         partStoreLock.lock(p);
 
         try {
-            assert !partDataStores.containsKey(p);
+            CacheDataStore store = createCacheDataStore0(p);
 
-            dataStore = createCacheDataStore0(p);
+            // Inject row cache cleaner on store creation.
+            // Used in case the cache with enabled SqlOnheapCache is single 
cache at the cache group.
+            if (ctx.kernalContext().query().moduleEnabled() && !grp.isLocal())
+                
store.setRowCacheCleaner(ctx.kernalContext().indexProcessor().rowCacheCleaner(grp.groupId()));

Review comment:
       Fixed.




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