vldpyatkov commented on code in PR #838:
URL: https://github.com/apache/ignite-3/pull/838#discussion_r887283029


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -461,14 +465,10 @@ private CompletableFuture<?> createTableLocally(long 
causalityToken, String name
             return completedFuture(val);
         });
 
-        // TODO should be reworked in IGNITE-16763
-        return tablesByIdVv.get(causalityToken)
-            .thenCompose(v -> schemaFut)
-            .thenRun(() -> {
-                fireEvent(TableEvent.CREATE, new 
TableEventParameters(causalityToken, table), null);
+        schemaFut.thenRun(() -> fireEvent(TableEvent.CREATE, new 
TableEventParameters(causalityToken, table), null));

Review Comment:
   Done.



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -502,23 +502,19 @@ private void dropTableLocally(long causalityToken, String 
name, UUID tblId, List
                 raftMgr.stopRaftGroup(raftGroupName(tblId, p));
             }
 
-            AtomicReference<TableImpl> tableHolder = new AtomicReference<>();
-
             tablesByIdVv.update(causalityToken, (previousVal, e) -> {
                 if (e != null) {
                     return failedFuture(e);
                 }
 
                 var map = new HashMap<>(previousVal);
 
-                TableImpl table = map.remove(tblId);
-
-                tableHolder.set(table);
+                map.remove(tblId);
 
                 return completedFuture(map);
             });
 
-            TableImpl table = tableHolder.get();
+            TableImpl table = tablesByIdVv.latest().get(tblId);
 
             assert table != null : "There is no table with the name specified 
[name=" + name + ']';

Review Comment:
   Done.



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

Reply via email to