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



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
##########
@@ -1458,17 +1491,22 @@ private void 
rebuildIndexes(Collection<GridCacheContext> contexts, Predicate<Gri
             1  //need at least 1 index rebuilded to print message about 
rebuilding completion
         );
 
-        for (GridCacheContext cacheCtx : contexts) {
-            if (!rebuildCond.test(cacheCtx))
-                continue;
+        Collection<GridCacheContext> rejected = new ArrayList<>(0);

Review comment:
       you can use lazy initialization instead of this trick. 




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