tkalkirill commented on code in PR #3917:
URL: https://github.com/apache/ignite-3/pull/3917#discussion_r1639349596
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/index/IndexMetaStorage.java:
##########
@@ -154,78 +169,86 @@ Collection<IndexMeta> indexMetasSnapshot() {
return List.copyOf(indexMetaByIndexId.values());
}
- private void onCatalogIndexCreateEvent(CreateIndexEventParameters
parameters) {
+ private CompletableFuture<Boolean>
onCatalogIndexCreateEvent(CreateIndexEventParameters parameters) {
CatalogIndexDescriptor catalogIndexDescriptor =
parameters.indexDescriptor();
Catalog catalog = catalog(parameters.catalogVersion());
- updateAndSaveIndexMetaToVault(catalogIndexDescriptor.id(), indexMeta
-> {
- assert indexMeta == null : catalogIndexDescriptor.id();
+ return updateAndSaveIndexMetaToMetastore(catalogIndexDescriptor.id(),
indexMeta -> {
+ assert indexMeta == null : "indexId=" +
catalogIndexDescriptor.id() + "catalogVersion=" + catalog.version();
- return new IndexMeta(catalogIndexDescriptor, catalog);
- });
+ return IndexMeta.of(catalogIndexDescriptor, catalog);
+ }).thenApply(unused -> false);
Review Comment:
Please read javadoc of `org.apache.ignite.internal.event.EventProducer` and
`org.apache.ignite.internal.event.EventListener` for understanding.
--
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]