AMashenkov commented on code in PR #2286:
URL: https://github.com/apache/ignite-3/pull/2286#discussion_r1269544201
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -1462,32 +1472,53 @@ private Set<Assignment>
calculateAssignments(TablePartitionId tablePartitionId)
}
/**
- * Creates a new table with the given {@code name} asynchronously. If a
table with the same name already exists, a future will be
- * completed with {@link TableAlreadyExistsException}.
+ * Creates a new table from parameters.
*
- * @param name Table name.
- * @param zoneName Distribution zone name.
- * @param tableInitChange Table changer.
+ * @param parameters Create table parameters.
* @return Future representing pending completion of the operation.
- * @throws IgniteException If an unspecified platform exception has
happened internally. Is thrown when:
- * <ul>
- * <li>the node is stopping.</li>
- * </ul>
* @see TableAlreadyExistsException
*/
- public CompletableFuture<Table> createTableAsync(String name, String
zoneName, Consumer<TableChange> tableInitChange) {
+ public CompletableFuture<Table> createTableAsync(CreateTableParams
parameters) {
if (!busyLock.enterBusy()) {
throw new IgniteException(new NodeStoppingException());
}
try {
- return createTableAsyncInternal(name, zoneName, tableInitChange);
+ String tableName = parameters.tableName();
+ String zoneName = Objects.requireNonNullElse(parameters.zone(),
DEFAULT_ZONE_NAME);
+
+ // Copied from DdlCommandHandler
+ Consumer<TableChange> tblChanger = tableChange -> {
Review Comment:
Then direct proxy will not work and we have no other way to wait for actual
cluster state on lagging node.
Maybe later a bit.
--
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]