tkalkirill commented on code in PR #1800:
URL: https://github.com/apache/ignite-3/pull/1800#discussion_r1144847930


##########
modules/index/src/main/java/org/apache/ignite/internal/index/IndexManager.java:
##########
@@ -534,32 +584,159 @@ public BinaryTuple convert(BinaryRow binaryRow) {
     }
 
     private class ConfigurationListener implements 
ConfigurationNamedListListener<TableIndexView> {
-        /** {@inheritDoc} */
         @Override
-        public @NotNull CompletableFuture<?> onCreate(@NotNull 
ConfigurationNotificationEvent<TableIndexView> ctx) {
+        public CompletableFuture<?> 
onCreate(ConfigurationNotificationEvent<TableIndexView> ctx) {
             return onIndexCreate(ctx);
         }
 
-        /** {@inheritDoc} */
         @Override
-        public @NotNull CompletableFuture<?> onRename(
+        public CompletableFuture<?> onRename(
                 String oldName,
                 String newName,
                 ConfigurationNotificationEvent<TableIndexView> ctx
         ) {
             return failedFuture(new 
UnsupportedOperationException("https://issues.apache.org/jira/browse/IGNITE-16196";));
         }
 
-        /** {@inheritDoc} */
         @Override
-        public @NotNull CompletableFuture<?> onDelete(@NotNull 
ConfigurationNotificationEvent<TableIndexView> ctx) {
+        public CompletableFuture<?> 
onDelete(ConfigurationNotificationEvent<TableIndexView> ctx) {
             return onIndexDrop(ctx);
         }
 
-        /** {@inheritDoc} */
         @Override
-        public @NotNull CompletableFuture<?> onUpdate(@NotNull 
ConfigurationNotificationEvent<TableIndexView> ctx) {
+        public CompletableFuture<?> 
onUpdate(ConfigurationNotificationEvent<TableIndexView> ctx) {
             return failedFuture(new IllegalStateException("Should not be 
called"));
         }
     }
+
+    /**
+     * Initializes the build of the index.
+     */
+    private void initIndexBuildIfNeeded(TableIndexView tableIndexView, 
TableImpl table) {
+        for (int partitionId = 0; partitionId < 
table.internalTable().partitions(); partitionId++) {
+            buildIndexExecutor.submit(new BuildIndexTask(table, 
tableIndexView, partitionId, true));

Review Comment:
   Since the leader of the raft group is involved in the process of building 
the index, if we are not the leader at the beginning of the task, then we 
either left the assignments, or we will receive a command to write from the 
leader about building the index.
   
   The case of changing the leader of the raft group will be done in a separate 
ticket.



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