rpuch commented on code in PR #2872:
URL: https://github.com/apache/ignite-3/pull/2872#discussion_r1405898579
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/SchemaCompatibilityValidator.java:
##########
@@ -259,4 +286,127 @@ void failIfRequestSchemaDiffersFromTxTs(HybridTimestamp
txTs, int requestSchemaV
throw new InternalSchemaVersionMismatchException();
}
}
+
+ private enum ValidatorVerdict {
+ COMPATIBLE, INCOMPATIBLE, DONT_CARE
Review Comment:
There are 3 verdicts: negative, positive and neutral.
Just 1 negative verdict is enough to reject the diff. If there are no
negative verdicats, but there is at least one positive one, the diff is
accepted. And if there are only neutral verdicts, this means that this is a
change for which there is no validator, so it's an unknown change.
We should not allow uknown changes, so I added assertions that every change
gets a non-neutral vote.
`DONT_CARE` means that a validator does not see any change *specific to this
validator* in the provided diff. For instance, we have a column diff, this
means that something has changed. Let's say that just nullability has changed.
Nullability validator would return COMPATIBLE or INCOMPATIBLE, but type change
validator would not see any change that is relevant to it and would return
DONT_CARE.
I added javadocs to `ValidatorVerdict`, I hope it made it clearer.
--
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]