AMashenkov commented on a change in pull request #9423:
URL: https://github.com/apache/ignite/pull/9423#discussion_r711989589



##########
File path: 
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteStatisticsRepository.java
##########
@@ -528,47 +444,69 @@ public void 
updateObsolescenceInfo(Map<StatisticsObjectConfiguration, Set<Intege
 
         for (Map.Entry<StatisticsKey, Set<Integer>> objDeleted : 
deleted.entrySet())
             store.clearObsolescenceInfo(objDeleted.getKey(), 
objDeleted.getValue());
+
+        fitObsolescenceInfo(cfg);
     }
 
     /**
-     * Load or update obsolescence info cache to fit specified cfg.
+     * Check store to clean unnecessary records.
      *
      * @param cfg Map object statistics configuration to primary partitions 
set.
      */
-    public synchronized void 
checkObsolescenceInfo(Map<StatisticsObjectConfiguration, Set<Integer>> cfg) {
-        if (!started.compareAndSet(false, true))
-            loadObsolescenceInfo(cfg);
-        else
-            updateObsolescenceInfo(cfg);
+    private void fitObsolescenceInfo(Map<StatisticsObjectConfiguration, 
Set<Integer>> cfg) {

Review comment:
       Why don't use BitSet instead of collections of boxed Integers.
   It is ok to do in separate task.




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