vldpyatkov commented on a change in pull request #330:
URL: https://github.com/apache/ignite-3/pull/330#discussion_r708434814
##########
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:
Possibly the logic with intentions might be reduced.
Because now all places when the intention is applying, an event is also
firing (create table intention -> create table event and so on).
It looks like a duplicate behavior, I think possible to use only one of them.
--
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]