tkalkirill commented on code in PR #2871:
URL: https://github.com/apache/ignite-3/pull/2871#discussion_r1406002341
##########
modules/index/src/main/java/org/apache/ignite/internal/index/IndexManager.java:
##########
@@ -444,4 +445,38 @@ private static <T> BiFunction<T, Throwable,
CompletableFuture<T>> updater(Functi
return updateFunction.apply(t);
};
}
+
+ /**
+ * Collects indexes (including deleted ones) for tables (tables from the
latest version of the catalog) from the earliest to the latest
+ * version of the catalog that need to be started on node recovery.
+ *
+ * @param catalogService Catalog service.
+ */
+ static Map<CatalogTableDescriptor, Collection<CatalogIndexDescriptor>>
collectIndexesForRecovery(CatalogService catalogService) {
+ int earliestCatalogVersion = catalogService.earliestCatalogVersion();
+ int latestCatalogVersion = catalogService.latestCatalogVersion();
+
+ var indexesByTableId = new
Int2ObjectOpenHashMap<Int2ObjectMap<CatalogIndexDescriptor>>();
+
+ for (CatalogTableDescriptor table :
catalogService.tables(latestCatalogVersion)) {
+ indexesByTableId.computeIfAbsent(table.id(), indexById -> new
Int2ObjectOpenHashMap<>());
Review Comment:
You're right, I corrected it.
--
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]