tkalkirill commented on code in PR #3358:
URL: https://github.com/apache/ignite-3/pull/3358#discussion_r1521632984


##########
modules/index/src/main/java/org/apache/ignite/internal/index/IndexManager.java:
##########
@@ -248,4 +298,44 @@ private static <T> BiFunction<T, Throwable, 
CompletableFuture<T>> updater(Functi
             return updateFunction.apply(t);
         };
     }
+
+    /** Recover deferred destroy events. */
+    private void recoverDeferredQueue() {
+        int earliestVersion = 
catalogService.earliestCatalogVersion(HybridTimestamp.hybridTimestampToLong(lowWatermark.getLowWatermark()));
+        int latestVersion = catalogService.latestCatalogVersion();
+
+        synchronized ((deferredQueue)) {
+            for (int version = latestVersion - 1; version >= earliestVersion; 
version--) {
+                int nextVersion = version + 1;
+                catalogService.indexes(version).stream()
+                        .filter(idx -> catalogService.index(idx.id(), 
nextVersion) == null)
+                        .forEach(idx -> deferredQueue.enqueue(new 
DestroyIndexEvent(nextVersion, idx.id(), idx.tableId())));
+            }
+        }
+    }
+
+    /** Internal event. */
+    private static class DestroyIndexEvent {

Review Comment:
   Up to u



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