rpuch commented on code in PR #3262:
URL: https://github.com/apache/ignite-3/pull/3262#discussion_r1499207075


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -612,23 +607,17 @@ private void markFinished(UUID txId, boolean commit, 
@Nullable HybridTimestamp c
         ));
     }
 
-    // TODO: IGNITE-21560 Add schema sync to 
BuildIndexCommand#startBuildingCatalogVersion
-    // TODO: IGNITE-21560 Skip command if index was removed
     private BuildIndexRowVersionChooser 
createBuildIndexRowVersionChooser(BuildIndexCommand command) {
-        int creationCatalogVersion = command.creationCatalogVersion();
-        Catalog creationIndexCatalog = 
catalogService.catalog(creationCatalogVersion);
+        int creationIndexCatalogVersion = command.creationCatalogVersion();
+        Catalog creationIndexCatalog = 
catalogService.catalog(creationIndexCatalogVersion);

Review Comment:
   ```suggestion
           Catalog indexCreationCatalog = 
catalogService.catalog(creationIndexCatalogVersion);
   ```



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -612,23 +607,17 @@ private void markFinished(UUID txId, boolean commit, 
@Nullable HybridTimestamp c
         ));
     }
 
-    // TODO: IGNITE-21560 Add schema sync to 
BuildIndexCommand#startBuildingCatalogVersion
-    // TODO: IGNITE-21560 Skip command if index was removed
     private BuildIndexRowVersionChooser 
createBuildIndexRowVersionChooser(BuildIndexCommand command) {
-        int creationCatalogVersion = command.creationCatalogVersion();
-        Catalog creationIndexCatalog = 
catalogService.catalog(creationCatalogVersion);
+        int creationIndexCatalogVersion = command.creationCatalogVersion();

Review Comment:
   ```suggestion
           int indexCreationCatalogVersion = command.creationCatalogVersion();
   ```



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -3719,12 +3719,13 @@ private static <T extends Comparable<T>> void 
updateTrackerIgnoringTrackerClosed
         }
     }
 
-    private static BuildIndexCommand 
toBuildIndexCommand(BuildIndexReplicaRequest request) {
+    private BuildIndexCommand toBuildIndexCommand(BuildIndexReplicaRequest 
request) {
         return MSG_FACTORY.buildIndexCommand()
                 .indexId(request.indexId())
                 .rowIds(request.rowIds())
                 .finish(request.finish())
                 .creationCatalogVersion(request.creationCatalogVersion())
+                
.requiredCatalogVersion(indexStartBuildingCatalogVersion(request))

Review Comment:
   How are we sure that the Catalog on the primary replica already contains 
BUILDING state of the index? If it doesn't, this will fail.



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