-
Notifications
You must be signed in to change notification settings - Fork 593
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
rpc/raft/cluster: start removing ADL encoding for RPCs #9121
Conversation
this is neat. it lasted a good while. |
31400dc
to
35f4cb8
Compare
This needs 23.1 to be released, so that upgrade tests that target the previous feature release will pick up 23.1 instead of 22.3 |
Saw failures in https://buildkite.com/redpanda/redpanda/builds/24695#0186c5d2-5cfc-4092-bf76-a0e67a1fece9:
|
/ci-repeat 4 |
On the repeats:
|
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.
well, that's awesome!
transport_version effective_version) mutable { | ||
/* | ||
* enforce the rule that a transport configured as v0 behaves like | ||
* a v0 client transport and sends v0 messages. | ||
*/ | ||
vassert( | ||
version != transport_version::v0 | ||
|| effective_version == transport_version::v0, | ||
version >= transport_version::min_supported, |
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.
the version and effective_version should now be the same, right? i'm also thinking that change may be coming up in a later commit.
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.
That will become true when we strip out the adl-only RPCs, so that encode_for_version
is never returning v0. Those are just the lingering coproc RPCs -- I think we can do that in a later PR.
vassert(version >= transport_version::v2, "Can't encode serde <= v2"); | ||
return ss::do_with(std::move(msg), [&out, version](T& msg) { | ||
return serde::write_async(out, std::move(msg)).then([version] { | ||
return 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.
ah i think this is it here where the caller gets effective version to input version
auto d = serialize_roundtrip_rpc(std::move(metadata)); | ||
auto d = serialize_roundtrip_rpc_adl(std::move(metadata)); |
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.
is this an example of one of the rpc messages that remain as adl (only?) ?
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.
The snapshot_metadata
is used in the on-disk format. I'll check if I'm using this method anywhere else and if not take the misleading 'rpc' out of the name
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.
oh right yeh that makes sense
tests/rptest/tests/redpanda_test.py
Outdated
|
||
return versions | ||
|
||
def upgrade_through_versions(self, versions): |
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.
nice change promoting this up to generic test infra
Since Redpanda 23.2, all RPCs are serde encoded, and all versions we may upgrade from also speak serde.
All the versions we may do a rolling upgrade from now support v2, and as of Redpanda 23.1 they will also speak v2 by default on all new connections, so there are no circumstances where we need to speak RPC v1 during a rolling upgrade.
Tests that relate to version upgrade are removed, as we no longer support a range of versions. Tests that used ADL now use serde. The mock request/response classes that specified a particular encoding are gone in favor of using serde everywhere. The encode_for_version method now needs to pass through versions for v2 transports because we have to use a v2 transport for testing what happens when a client uses a too-new version.
This test covers the hop from 22.2 to 22.3 specifically: we do not need to carry the test indefinitely. We could retain this test by updating it to step through all intermediate versions, but it's not worth it: when we upgrade to latest redpanda, the system will have passed through the already-tested 22.3 code that handles the upgrade.
This <= should have been <, to avoid skipping through versions to quickly.
There is more than one test that should be stepping through all verisons in a series.
...to not skip straight from 22.2.x to HEAD, which will fail now that HEAD is truly incompatible with such old versions, without ADL RPC. The test now does 22.2.8->23.1.x, then downgrades, then goes all the way to HEAD via all intervening feature versions.
...to not try and skip straight from 22.1.x to HEAD.
...it is no longer used for any cases involving RPC, just structures that we serialize to disk.
Failures are all CloudStorageUsageTest -- this PR should be good to go. |
Do these changes need backport into v23.1.x? |
Definitely not, 23.1.x needs to remain ADL compatible to upgrade cleanly from 22.3.x |
I did a double take on this from the cover letter too. |
redpanda-data#9121 Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Seems to have been partially cleaned up in redpanda-data#9121. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Seems to have been partially cleaned up in redpanda-data#9121. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Seems to have been partially cleaned up in redpanda-data#9121. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit cfd6325)
Seems to have been partially cleaned up in redpanda-data#9121. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit cfd6325)
Seems to have been partially cleaned up in redpanda-data#9121. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit cfd6325)
Seems to have been partially cleaned up in redpanda-data#9121. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit cfd6325)
Seems to have been partially cleaned up in redpanda-data#9121. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit cfd6325)
Seems to have been partially cleaned up in redpanda-data#9121. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit cfd6325)
Seems to have been partially cleaned up in redpanda-data#9121. Signed-off-by: Noah Watkins <noahwatkins@gmail.com> (cherry picked from commit cfd6325)
Since Redpanda 23.1, ADL encoded RPCs are no longer used. We no longer need to carry these deprecated serialization paths to enable rolling upgrades.
This PR doesn't remove all cases, but targets major ones + those that I have other PRs touching (disk usage in health messages for #6549 and raft messages for #6365), so that I can remove any ADL parts of those PRs.
Backports Required
UX Changes
None
Release Notes