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



##########
File path: 
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
##########
@@ -199,144 +195,199 @@ public TableManager(
             listenElements(new ConfigurationNamedListListener<TableView>() {
             @Override
             public @NotNull CompletableFuture<?> onCreate(@NotNull 
ConfigurationNotificationEvent<TableView> ctx) {
-                // Empty assignments might be a valid case if tables are 
created from within cluster init HOCON
-                // configuration, which is not supported now.
-                assert ((ExtendedTableView)ctx.newValue()).assignments() != 
null :
-                    "Table =[" + ctx.newValue().name() + "] has empty 
assignments.";
-
-                final IgniteUuid tblId = 
IgniteUuid.fromString(((ExtendedTableView)ctx.newValue()).id());
-
-                // TODO: IGNITE-15409 Listener with any placeholder should be 
used instead.
-                
((ExtendedTableConfiguration)tablesCfg.tables().get(ctx.newValue().name())).schemas().
-                    listenElements(new ConfigurationNamedListListener<>() {
-                        @Override public @NotNull CompletableFuture<?> 
onCreate(
-                            @NotNull 
ConfigurationNotificationEvent<SchemaView> schemasCtx) {
-                            try {
-                                
((SchemaRegistryImpl)tables.get(ctx.newValue().name()).schemaView()).
-                                    onSchemaRegistered(
-                                        
SchemaSerializerImpl.INSTANCE.deserialize((schemasCtx.newValue().schema()))
-                                    );
+                if (!busyLock.enterBusy()) {
+                    String tblName = ctx.newValue().name();
+                    IgniteUuid tblId = 
IgniteUuid.fromString(((ExtendedTableView)ctx.newValue()).id());
+
+                    fireEvent(TableEvent.CREATE,
+                        new TableEventParameters(tblId, tblName),
+                        new NodeStoppingException("Operation has been 
cancelled (node is stopping)."));
+                }
+                try {
+                    onTableCreateInternal(ctx);

Review comment:
       Fixed.




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