You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/05/04 10:06:06 UTC

[GitHub] [ignite] Erixonich commented on a change in pull request #9061: IGNITE-14469 Add test that ensures correctness of sequential call index_force_rebuild, some refactoring

Erixonich commented on a change in pull request #9061:
URL: https://github.com/apache/ignite/pull/9061#discussion_r625660154



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/visor/cache/index/IndexForceRebuildTask.java
##########
@@ -68,111 +65,60 @@ protected IndexForceRebuildJob(@Nullable IndexForceRebuildTaskArg arg, boolean d
             throws IgniteException
         {
             //Either cacheNames or cacheGrps must be specified
-            assert (arg.cacheNames() == null) != (arg.cacheGrps() == null) :
-                "Either cacheNames or cacheGroups must be specified";
-
-            // Collect info about indexes being rebuilt.
-            Set<IndexRebuildStatusInfoContainer> rebuildIdxCaches =
-                ignite.context().cache().publicCaches()
-                    .stream()
-                    .filter(c -> !c.indexReadyFuture().isDone())
-                    .map(this::fromIgniteCache)
-                    .collect(Collectors.toSet());
-
-            Set<String> rebuildIdxCachesNames = rebuildIdxCaches.stream()
-                .map(IndexRebuildStatusInfoContainer::cacheName)
-                .collect(Collectors.toSet());
+            assert (arg.cacheNames() == null) ^ (arg.cacheGrps() == null) :
+                "Either cacheNames or cacheGroups must be specified.";
 
-            if (arg.cacheNames() != null)
-                return rebuildByCacheNames(arg.cacheNames(), rebuildIdxCaches, rebuildIdxCachesNames);
-            else if (arg.cacheGrps() != null)
-                return rebuildByGroupNames(arg.cacheGrps(), rebuildIdxCaches, rebuildIdxCachesNames);
-            else {
-                assert false : "Neither cache names nor cache groups specified";
+            if (arg.cacheNames() == null && arg.cacheGrps() == null) {

Review comment:
       This is should work without -ea launching option.




-- 
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:
users@infra.apache.org