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



##########
File path: 
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
##########
@@ -627,37 +516,57 @@ private void dropTableLocally(String name, UUID tblId, 
List<List<ClusterNode>> a
     @Override public CompletableFuture<Void> alterTableAsync(String name, 
Consumer<TableChange> tableChange) {
         CompletableFuture<Void> tblFut = new CompletableFuture<>();
 
-        listen(TableEvent.ALTER, new EventListener<>() {
-            @Override public boolean notify(@NotNull TableEventParameters 
parameters, @Nullable Throwable e) {
-                String tableName = parameters.tableName();
-
-                if (!name.equals(tableName))
-                    return false;
-
-                if (e == null)
-                    tblFut.complete(null);
-                else
-                    tblFut.completeExceptionally(e);
-
-                return true;
+        tableAsync(name, true).thenAccept(tbl -> {
+            if (tbl == null) {
+                tblFut.completeExceptionally(new IgniteException(
+                    LoggerMessageHelper.format("Table already exists 
[name={}]", name)));

Review comment:
       It is a wrong message.
   Table does not exist and cannot be altered.




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