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


##########
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:
   On the one hand, you are right, but on the other hand, they won’t do it in 
another place. 
   In theory, if a component is stopped, then it is responsible to complete the 
future with an error, and not rely on another component.



##########
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:
   On the one hand, you are right, but on the other hand, they won’t do it in 
another place. 
   In theory, if a component is stopped, then it is responsible to complete the 
future with an error, and not rely on another component.



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

Reply via email to