sashapolo commented on code in PR #3216:
URL: https://github.com/apache/ignite-3/pull/3216#discussion_r1491050321
##########
modules/index/src/main/java/org/apache/ignite/internal/index/ChangeIndexStatusTask.java:
##########
@@ -149,28 +158,33 @@ CompletableFuture<Void> start() {
}
try {
- return supplyAsync(() ->
awaitActivateForCatalogVersionOfIndexCreation()
- .thenCompose(unused ->
ensureThatLocalNodeStillPrimaryReplica())
- .thenCompose(unused ->
inBusyLocks(logicalTopologyService::logicalTopologyOnLeader))
-
.thenComposeAsync(this::awaitFinishRwTxsBeforeCatalogVersionOfIndexCreation,
executor)
- .thenComposeAsync(unused -> switchIndexToBuildingStatus(),
executor), executor)
- .thenCompose(Function.identity())
- .handle((unused, throwable) -> {
+ LOG.info("Starting task to change index status. Index: {}",
indexDescriptor);
+
+ return awaitCatalogVersionActivation()
Review Comment:
Can you please clarify? What's the problem of going to the network, if we
wait for the response asynchronously?
--
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]