-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lift MessagingService.minimum_version to 40 (CASSANDRA-18314) #2506
Conversation
d73edb1
to
8782e8d
Compare
8782e8d
to
8ca83e2
Compare
8ca83e2
to
de689b4
Compare
src/java/org/apache/cassandra/net/InboundConnectionInitiator.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/net/InboundConnectionInitiator.java
Outdated
Show resolved
Hide resolved
90d1755
to
530750f
Compare
all comments addressed. |
I think another thing that can be slightly simplified now that we don't expect 3.0 nodes is The JavaDoc for |
can we do that in a separate ticket, not related to MessagingService (see parent ticket) |
c4202bf
to
3a0f7f9
Compare
Yeah, it can be a separate ticket since the min cluster version doesn't come from Edit: Created CASSANDRA-18695 for not considering 3.x nodes in |
These methods are not used and I think can be removed:
Do we need to generate benchmarks for a 'pre40'? |
// if the other node is pre-4.0, it will respond only with its maxMessagingVersion
if (maxMessagingVersion < VERSION_40 || handshakeMessagingVersion < VERSION_40)
return new Accept(useMessagingVersion, maxMessagingVersion); Should we return |
changing that breaks HandshakeTest 🤷 |
a7f098d
to
820daac
Compare
Returning null there doesn't break |
this is related to something else than the messaging service. a separate ticket under the epic CASSANDRA-18306 is warranted. |
I have found a few if-else statements The production code classes:
|
The
|
all comments addressed. |
Sorry, the last one :-) The |
I think this can be removed as it is always if (MessagingService.instance().versions.knows(node) &&
MessagingService.instance().versions.getRaw(node) < MessagingService.VERSION_40)
{
before4.add(node);
continue;
} |
Can remove the following: if (version < MessagingService.VERSION_40)
{
assertFalse(deser.mayIncludeRepairedDigest());
// even though that means they should never be used, verify that the default values are present
assertEquals(ByteBufferUtil.EMPTY_BYTE_BUFFER, deser.repairedDataDigest());
assertTrue(deser.isRepairedDigestConclusive());
} |
For the
|
The
|
this is its own kettle of fish, separate ticket please. |
4de32c9
to
dffa365
Compare
comments addressed. |
@michaelsembwever Thank you, re-checked the comments and sources - OK |
adcefb6
to
43477dd
Compare
testAddress(ipv4, MessagingService.VERSION_40); | ||
testAddress(ipv6, MessagingService.VERSION_40); | ||
testAddress(ipv4, MessagingService.minimum_version); | ||
testAddress(ipv6, MessagingService.minimum_version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will test VERSION_40
three times, since it's the value of MessagingService.minimum_version
and MessagingService.current_version
. However, VERSION_50
won't be tested. I think we could modify the test to simply use VERSION_40
and VERSION_50
, and maybe make sure that minimum_version
and current_version
are among them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can see value in testing both explicit values and the minimum and current defined.
cost is irrelevant here.
so… i'd rather add VERSION_50 and not remove any. wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually… i should loop through supportedVersions()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, supportedVersions()
is perfect for this.
@@ -41,12 +41,6 @@ public void testCurrent() throws Exception | |||
testVersion(MessagingService.current_version); | |||
} | |||
|
|||
@Test | |||
public void test30() throws Exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now ForwardingInfoTest#testVersion(int)
is always called with the same value. I think it can be either inlined into ForwardingInfoTest#testCurrent()
or annotated with @SuppressWarnings("SameParameterValue")
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going to loop through supportedVersions()
// ReadResponses from pre-4.0 nodes will never contain repaired data digest | ||
// or pending session info, but we run all messages through both pre/post 4.0 | ||
// serde to check that the defaults are correctly applied | ||
// check that roundtripping through ReadResponse.serializer behaves as expected | ||
roundTripSerialization(response, MessagingService.current_version); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roundTripSerialization
now always takes the same version argument. I'd either inline it or annotate the method with @SuppressWarnings("SameParameterValue")
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going to loop through supportedVersions()
43477dd
to
d3a99e7
Compare
@adelapena comments addressed |
d3a99e7
to
6cb8f62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last changes look good to me, +1. Do we have a CI run for them?
CI SSL broken tests are from jdk17. |
latest CI all failures are not related. |
CI results look good to me. There are failures for I have created CASSANDRA-18703 for that test failure. As for the j17 workflow, I've started a few tests here: https://app.circleci.com/pipelines/github/adelapena/cassandra/3069/workflows/613644ed-b9d6-4d81-9ef3-ee9d13625fd5 |
Patch by Jacek Lewandowski; reviewed by Stefan Miklosovic for CASSANDRA-18698
patch by Mick Semb Wever; reviewed by Andrés de la Peña García, Maxim Muzafarov for CASSANDRA-18314
6cb8f62
to
c6084a6
Compare
Committed 4bbfd64 |
No description provided.