sanpwc commented on code in PR #1968:
URL: https://github.com/apache/ignite-3/pull/1968#discussion_r1183337595
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -1343,72 +1355,132 @@ private Set<Assignment>
calculateAssignments(TableConfiguration tableCfg, int pa
* </ul>
* @see TableAlreadyExistsException
*/
- public CompletableFuture<Table> createTableAsync(String name,
Consumer<TableChange> tableInitChange) {
+ public CompletableFuture<Table> createTableAsync(String name, String
zoneName, Consumer<TableChange> tableInitChange) {
if (!busyLock.enterBusy()) {
throw new IgniteException(new NodeStoppingException());
}
try {
- return createTableAsyncInternal(name, tableInitChange);
+ return createTableAsyncInternal(name, zoneName, tableInitChange);
} finally {
busyLock.leaveBusy();
}
}
- /** See {@link #createTableAsync(String, Consumer)} for details. */
- private CompletableFuture<Table> createTableAsyncInternal(String name,
Consumer<TableChange> tableInitChange) {
+ /** See {@link #createTableAsync(String, String, Consumer)} for details. */
+ private CompletableFuture<Table> createTableAsyncInternal(
+ String name,
+ String zoneName,
+ Consumer<TableChange> tableInitChange
+ ) {
CompletableFuture<Table> tblFut = new CompletableFuture<>();
+ tableAsyncInternal(name)
+ .thenAccept(tbl -> {
+ if (tbl != null) {
+ tblFut.completeExceptionally(new
TableAlreadyExistsException(DEFAULT_SCHEMA_NAME, name));
+ } else {
+
distributionZoneManager.zoneIdAsyncInternal(zoneName).handle((zoneId, ex) -> {
Review Comment:
Which of the aforementioned tests do check what will we await dataNodes
evaluation for immediate timers?
Meaning that there should be at least following tests:
1. The one that check that we await **topology version** within DZM.
2. The one that check that we await immediate timers but skip non-immediate
ones.
--
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]