CASSANDRA-21174: Prevent log-incompatible upgrades#4614
CASSANDRA-21174: Prevent log-incompatible upgrades#4614aparna0522 wants to merge 7 commits intoapache:trunkfrom
Conversation
fc7e48d to
b875077
Compare
krummas
left a comment
There was a problem hiding this comment.
code looks good, but tests need a bit of work
the new tests can be unit tests instead, and we should have a test which tries to actually commit a register/startup with a lower version.
src/java/org/apache/cassandra/config/CassandraRelevantProperties.java
Outdated
Show resolved
Hide resolved
test/distributed/org/apache/cassandra/distributed/test/log/RegisterTest.java
Show resolved
Hide resolved
test/distributed/org/apache/cassandra/distributed/test/log/RegisterTest.java
Outdated
Show resolved
Hide resolved
0b4fbcf to
0e6ea5f
Compare
0e6ea5f to
b651a23
Compare
test/distributed/org/apache/cassandra/distributed/test/log/RegisterTest.java
Show resolved
Hide resolved
|
There are a handful of other new test failures, but they're easily fixable: InsertUpdateIfConditionTest (and friends)This test is/was partially concerned with verifying the behaviour of certain statements when the cluster is being upgraded (see CASSANDRA-16415 for details). The way that the test fixtures are setting up ClusterMetadata to perform this verification is no longer possible after the additional constraints were added to ClusterMetadataTestThe failures here were in tests which assert that transformations with a min common version requirement can't be committed if the actual common version is lower. It was just the setup that was at fault as it was registering nodes with a higher version, before trying to add another with a lower version. As that is now disallowed, I just reversed the ordering, so that the node on the older version is added first. The only minor complication is that the first node becomes the sole CMS member, so assassinating it to reset the min common version isn't possible. So, instead the test now upgrades that node which ultimately has the same effect of raising the min common version. Test fix |
patch by @aparna0522; reviewed by @krummas and @beobal
Thanks for sending a pull request! Here are some tips if you're new here:
Commit messages should follow the following format:
The Cassandra Jira