pjfanning opened a new pull request, #3516:
URL: https://github.com/apache/pekko/pull/3516
### Motivation
`ClusterMessageSerializer` still accepted the long class-based manifests
kept "for one
version iteration from Akka 2.6.4 to allow rolling migration to short
manifests", marked
removable "in Akka 2.6.6 or later" — the thirteen `Old*` / `*Pre2523` vals
and their
`fromBinary` branches.
No peer a Pekko node can talk to emits them:
- Pekko has always emitted the short manifests (`J`, `W`, `GE`, …) — the
long form was
only ever *sent* by Akka ≤ 2.6.4.
- An actual old Akka node would send
`akka.cluster.InternalClusterAction$Join` and
friends. These constants were renamed to `org.apache.pekko.cluster.*` by
the fork's
package rename, and nothing in `pekko-remote` translates manifests, so
they can never
match what such a node sends either.
So every branch is dead code — and each one is a wire-reachable
deserialization path,
which is exactly the surface the recent serializer hardening has been
shrinking.
### Modification
Remove the vals, their `fromBinary` cases, and the two heartbeat
deserializers only those
cases used (`deserializeHeartBeatAsAddress`,
`deserializeHeartBeatRspAsUniqueAddress`).
In the spec, remove the old-manifest round-trip tests and their now-unused
helpers
(`roundtripWithManifest`, `checkDeserializationWithManifest`), and add a
test asserting
every removed manifest is now rejected as an unknown manifest.
### Result
The class-based manifests are refused with
`IllegalArgumentException("Unknown manifest
[...]")` like any other unrecognised manifest. Handling of the short
manifests is
unchanged.
### Tests
- `sbt "cluster/testOnly
org.apache.pekko.cluster.protobuf.ClusterMessageSerializerSpec"` — 8 passed
- The new rejection test was checked to discriminate by reverting the
production change
and re-running: it then fails because the old manifest routes into
`deserializeJoin`,
which raises `InvalidProtocolBufferException` on the test payload instead
of the
unknown-manifest rejection.
- `sbt "cluster/mimaReportBinaryIssues"` — no issues
- `sbt "cluster/scalafmtCheckAll"` — clean
### References
None — removes dead Akka 2.6.4 compatibility code.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]