sashapolo commented on code in PR #2143:
URL: https://github.com/apache/ignite-3/pull/2143#discussion_r1221082188


##########
modules/index/src/main/java/org/apache/ignite/internal/index/IndexManager.java:
##########
@@ -436,31 +436,39 @@ private CompletableFuture<?> 
onIndexCreate(ConfigurationNotificationEvent<TableI
         }
 
         try {
-            return createIndexLocally(evt.storageRevision(), tableId, 
evt.newValue(), evt.newValue(TablesView.class));
+            TablesView tablesView = evt.newValue(TablesView.class);
+
+            TableView tableView = findTableView(tableId, 
(NamedListView<TableView>) tablesView.tables());
+
+            org.apache.ignite.internal.catalog.descriptors.TableDescriptor 
catalogTableDescriptor = toTableDescriptor(tableView);

Review Comment:
   I would propose to remove it, because IDEA's warnings are annoying



##########
modules/index/src/main/java/org/apache/ignite/internal/index/IndexManager.java:
##########
@@ -436,31 +436,39 @@ private CompletableFuture<?> 
onIndexCreate(ConfigurationNotificationEvent<TableI
         }
 
         try {
-            return createIndexLocally(evt.storageRevision(), tableId, 
evt.newValue(), evt.newValue(TablesView.class));
+            TablesView tablesView = evt.newValue(TablesView.class);
+
+            TableView tableView = findTableView(tableId, 
(NamedListView<TableView>) tablesView.tables());
+
+            org.apache.ignite.internal.catalog.descriptors.TableDescriptor 
catalogTableDescriptor = toTableDescriptor(tableView);
+            org.apache.ignite.internal.catalog.descriptors.IndexDescriptor 
catalogIndexDescriptor = toIndexDescriptor(indexConfig);
+
+            return createIndexLocally(evt.storageRevision(), 
catalogTableDescriptor, catalogIndexDescriptor);
         } finally {
             busyLock.leaveBusy();
         }
     }
 
     private CompletableFuture<?> createIndexLocally(
             long causalityToken,
-            int tableId,
-            TableIndexView tableIndexView,
-            TablesView tablesView
+            org.apache.ignite.internal.catalog.descriptors.TableDescriptor 
catalogTableDescriptor,

Review Comment:
   yep



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