AMashenkov commented on a change in pull request #330:
URL: https://github.com/apache/ignite-3/pull/330#discussion_r707450444



##########
File path: 
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
##########
@@ -123,42 +122,143 @@
     private final Map<String, TableImpl> tables = new ConcurrentHashMap<>();
 
     /** Tables. */
-    private final Map<UUID, TableImpl> tablesById = new ConcurrentHashMap<>();
+    private final Map<IgniteUuid, TableImpl> tablesById = new 
ConcurrentHashMap<>();
+
+    /**
+     * tableId -> future that adds an ability to await distributed table 
creation on local node from within the context
+     * of user's table creation intention.
+     *
+     * In other words, awaiting local {@link 
TableManager#createTableLocally(String, IgniteUuid, List, SchemaDescriptor)}
+     * from within {@link TableManager#createTableAsync(String, Consumer, 
boolean)}
+     */
+    private final Map<IgniteUuid, CompletableFuture<Table>> createTblIntention 
= new ConcurrentHashMap<>();

Review comment:
       Seems, we can have only one intention for every single table at any 
time: either to add, drop or alter, but not any combination. Or do we?
   Maybe we can extend Completable future and enrich it with additional 
information? and use a single collection?
   




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