AMashenkov commented on code in PR #2518: URL: https://github.com/apache/ignite-3/pull/2518#discussion_r1312784503
########## modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java: ########## @@ -1837,18 +1821,20 @@ public CompletableFuture<List<Table>> tablesAsync() { * @return Future representing pending completion of the operation. */ private CompletableFuture<List<Table>> tablesAsyncInternal() { - return supplyAsync(() -> inBusyLock(busyLock, this::directTableIds), ioExecutor) - .thenCompose(tableIds -> inBusyLock(busyLock, () -> { - var tableFuts = new CompletableFuture[tableIds.size()]; + return schemaSyncService.waitForMetadataCompleteness(clock.now()) Review Comment: However, I believe, we should never do `future.join()` inside the busylock. ``` private <T> T join(CompletableFuture<T> future) { if (!busyLock.enterBusy()) { throw new IgniteException(new NodeStoppingException()); } try { return future.join(); } catch (CompletionException ex) { throw convertThrowable(ex.getCause()); } finally { busyLock.leaveBusy(); } } ``` -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org