zstan commented on a change in pull request #8962:
URL: https://github.com/apache/ignite/pull/8962#discussion_r608361297



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
##########
@@ -3807,4 +3802,102 @@ public void manager(SchemaOperationManager mgr) {
             this.mgr = mgr;
         }
     }
+
+    /**
+     * Preparing futures of rebuilding indexes for caches.
+     * The future for the cache will be added only if the previous one is 
missing or completed.
+     *
+     * @param cacheIds Cache ids.
+     * @param initVer Initial affinity topology version of the exchange.
+     * @return Cache ids for which features have not been added.
+     */
+    public Set<Integer> prepareIndexRebuildFutures(Set<Integer> cacheIds, 
@Nullable AffinityTopologyVersion initVer) {
+        if (!cacheIds.isEmpty()) {
+            synchronized (idxRebuildFuts) {

Review comment:
       still have no clue why do we need such sync here, can u explain ?




-- 
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:
[email protected]


Reply via email to