rpuch commented on code in PR #7815:
URL: https://github.com/apache/ignite-3/pull/7815#discussion_r2979468172
##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/schemacompat/SchemaCompatibilityValidator.java:
##########
@@ -482,4 +509,24 @@ public ValidationResult compatible(ColumnDefinitionDiff
diff) {
: new ValidationResult(ValidatorVerdict.INCOMPATIBLE,
"Column type changed incompatibly");
}
}
+
+ private static class IndexStartedBuildingValidator implements
ForwardCompatibilityValidator {
+ @Override
+ public ValidationResult compatible(TableDefinitionDiff diff,
ValidationContext context) {
+ Int2IntMap indexesJustStartedBeingBuilt =
diff.indexesJustStartedBeingBuilt();
+ if (indexesJustStartedBeingBuilt.isEmpty()) {
+ return ValidationResult.DONT_CARE;
+ }
+
+ for (int indexId : indexesJustStartedBeingBuilt.keySet()) {
+ int registeredCatalogVersion =
indexesJustStartedBeingBuilt.get(indexId);
+
+ if (context.initialSchemaCatalogVersion <
registeredCatalogVersion) {
+ return new ValidationResult(ValidatorVerdict.INCOMPATIBLE,
"Index was both created and started being built");
Review Comment:
I improved the message and added a comment explaining why this message is
chosen
--
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]