korlov42 commented on code in PR #3263:
URL: https://github.com/apache/ignite-3/pull/3263#discussion_r1508640878


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java:
##########
@@ -454,21 +457,25 @@ private CompletableFuture<Void> handle(SnapshotEntry 
event, long causalityToken)
             // Use reverse order to find latest descriptors.
             Collection<Catalog> droppedCatalogVersions = 
catalogByVer.headMap(catalog.version(), false).descendingMap().values();
 
-            // Collect destroy events for dropped tables/indexes.
-            IntSet droppedObjects = new IntOpenHashSet();
             List<Fireable> events = new ArrayList<>();
+            IntSet objectToSkip = new IntOpenHashSet();
+            Predicate<CatalogObjectDescriptor> filter = obj -> 
objectToSkip.add(obj.id());
 
+            // At first, add alive indexes to filter.
+            applyToAliveIndexesFrom(catalog.version(), filter::test);

Review Comment:
   ```suggestion
               applyToAliveIndexesFrom(catalog.version(), object -> 
objectToSkip.add(object.id()));
   ```
   
   although this way it a bit longer, it better reflects intention



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