sanpwc commented on a change in pull request #388:
URL: https://github.com/apache/ignite-3/pull/388#discussion_r726029954



##########
File path: 
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
##########
@@ -861,10 +866,28 @@ private void dropTableLocally(String name, IgniteUuid 
tblId, List<List<ClusterNo
 
         tbl = tablesById.get(id);
 
-        if (tbl != null && getTblFut.complete(tbl) || getTblFut.complete(null))
+        if (tbl != null && getTblFut.complete(tbl) ||
+            !isTableConfigured(id) && getTblFut.complete(null))
             removeListener(TableEvent.CREATE, clo, null);
 
-        return getTblFut.join();
+        return getTblFut;
+    }
+
+    /**
+     * @param id Table id.
+     * @return True when the table is configured into cluster, false otherwise.
+     */
+    private boolean isTableConfigured(IgniteUuid id) {
+        NamedListView<TableView> directTablesCfg = 
((DirectConfigurationProperty<NamedListView<TableView>>)tablesCfg.tables()).directValue();
+
+        for (String name : directTablesCfg.namedListKeys()) {

Review comment:
       As was discussed let's add todo here with ticket 
https://issues.apache.org/jira/browse/IGNITE-15721




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