Repository navigation
Serialization: delete the built-in serializer rows from module HOCON (#8676, PR 4a) - #8711
Merged
Aaronontheweb merged 4 commits intoOct 2, 2026
Conversation
…kkadotnet#8676, PR 4a) Each first-party module's serializer table now registers its serializers, bindings and ids as defaults, so the matching rows in Remote.conf, Cluster.conf, the Cluster.Tools confs, Sharding, DistributedData, Cluster.Metrics, persistence.conf and Streams' reference.conf were duplicates. Delete them (19 serializers, 51 bindings, 19 ids); keep the serialization-settings blocks and core's own rows. Table parity tests now compare against a frozen copy of the rows from the 1.6.0-beta1 tag, plus cross-module checks for unique aliases and ids and one alias per bound type.
… version skew; docs fixes With the HOCON rows gone, a module whose serializer table fails to load (for example Akka.Remote and Akka.dll at different versions) no longer has a row to fall back on, so its serializers vanished without a trace. Log an error naming the module and the exception; startup still carries on, and a module that is simply not deployed stays silent. Docs: rewrite "Serializer Ids" (built-in ids are fixed in code, HOCON ids are for custom serializers, a subclass reads its own row), use a user-owned serializer in the source-generated registration example, fix the router mapping note in cluster-metrics, and fix stale comments about module reference.conf rows.
Both words were already in serialization.md; the docs edits moved them out of a span the code-fence ignore pattern happened to cover.
…of a frozen copy of the rows SerializerTableSpec (Akka.API.Tests) dumps every table in ModuleSerializerTable.Default - one line per alias with its serializer type and id, one line per bound type, sorted ordinally - and verifies it against an approved snapshot, the way the repo approves the public API. The first snapshot is exactly what 1.6.0-beta1 shipped. Cross-module uniqueness checks (aliases, ids, one alias per bound type, one alias per serializer type) run over the live tables and core's rows in the same class. Delete FrozenSerializerRows and BuiltInSerializerIdentifierSpec. The per-module specs keep their behavioural checks, with expected values taken from the live table.
Aaronontheweb
enabled auto-merge (squash)
October 2, 2026 17:58
This was referenced Oct 2, 2026
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
PR 4a of #8676. Since #8702, each first-party module's serializer table registers its serializers and bindings as defaults when the module is deployed, and the serializer ids live in code (#8694). The matching rows in each module's shipped HOCON were duplicates. This PR deletes them. The module tables are now the only source of built-in serializer registration.
Next in this plan: composing config from deployed modules at startup (#8707), which replaces the planned reload guard.
What was deleted
Rows under
akka.actor.serializers,akka.actor.serialization-bindingsandakka.actor.serialization-identifiers:Remote.conf)PoisonPillwas listed twice)reference.conf)Cluster.conf)persistence.conf)Kept: every
akka.actor.serialization-settingsblock (for exampleprimitive { use-legacy-behavior = on }inRemote.conf), and core's own rows inakka.conf(bytes,json, theSystem.Byte[]andSystem.Objectbindings). Hyperion and other non-table serializers are untouched.What read the deleted rows
Product code: nothing read them.
SerializerIdentifierHelperstill readsserialization-identifiers, but only as the fallback for a serializer that does not declare its ownIdentifier(a custom serializer, or a subclass of a built-in one). Every built-in serializer declares its id in code.Readers I changed:
ReplicatorSettingsSpec(Akka.DistributedData.Tests) asserted the DistributedData rows throughSettings.Config. It now asksSerialization(GetSerializerById,FindSerializerForType).BuiltInSerializerIdentifierSpec(Akka.API.Tests) compared every serializer'sIdentifierwith the liveserialization-identifiersrows.SerializerTableSpecreplaces it (see below).SerializerORSet,SerializerORDictionary,SerializerLwwDictionary) carried a private copy of the DistributedData rows. They now start a plain system.serialization.md(new section, and the "final HOCON settings" example no longer lists Remote's ids),source-generated-serialization.md(Remote no longer registers Artery's serializer fromRemote.conf),cluster-metrics.md(the sample config no longer shows the rows). XML comments in the module tables andArteryControlMessageSerializerno longer point atRemote.conf.Akka.Hostingdoes not read the rows and needed no change.Tests
The guard is an approval test of the live tables, in one place:
src/core/Akka.API.Tests, the repo's "approved contracts" project, which already references all eight module assemblies.SerializerTableSpec.ApproveModuleSerializerTablesbuilds every table inModuleSerializerTable.Defaultagainst a realActorSystemand verifies the result with Verify, using the same settings asCoreAPISpec. The snapshot issrc/core/Akka.API.Tests/verify/SerializerTableSpec.ApproveModuleSerializerTables.DotNet.verified.txt(77 lines): per module, one line per alias with its serializer type and id, then one line per bound type, all sorted ordinally.1.6.0-beta1tag's conf files gives the same 19 aliases, ids and 50 bound types.dotnet test src/core/Akka.API.Tests, compare*.received.txtwith*.verified.txtinverify/, and copy the received file over once the diff is what you meant. A new serializer or a binding moved at a cut-over (V2 rows, for example) then shows up in review as a snapshot diff.ActorSystemwith every module deployed and no module rows, and checks each id and bound type resolves to the table's serializer with dynamic type loading on and off.*SerializersSpeckeeps its behavioural checks, with expected values taken from the live table: a plain system resolves every table entry (dynamic type loading on and off), the Akka.Hosting spelling resolves, a binding override wins with and without copied rows in the config, and a new alias override test (akka.actor.serializers.<alias>pointed at another serializer moves the alias's bound types).BuiltInSerializerSpecsin Akka.Cluster.Hosting.Tests starts a hosted app with remoting, clustering and pub-sub, checks the built-in serializers resolve with no rows in the config, and round-trips a message. A second test checks a hosted HOCON binding still wins.ModuleSerializersSpec: a skewed module table (load-time, static-initializer and build-time failures) logs one error and startup succeeds; a module that is not deployed logs nothing.Breaking changes
ActorSystem.Settings.Configunderakka.actor.serializers,akka.actor.serialization-bindingsandakka.actor.serialization-identifiers. Code that read them to find a built-in serializer must useSerialization(for exampleFindSerializerForType,FindSerializerFor).SerializationSetupstill wins over both. Rows an application copied from 1.5 still work. Wire format and serializer ids are unchanged.Remote.confand the other module configs shrink, so anything that diffed or rendered them sees fewer rows.I did not touch
BREAKING_CHANGES_V1.6.md.Verification
dotnet build Akka.slnx -c Release -warnaserror: 0 warnings, 0 errors.dotnet test src/core/Akka.API.Tests: 30 passed, no public API change.--filter "FullyQualifiedName~Serializ"passes in Akka.Tests (154), Akka.Remote.Tests (185), Akka.Cluster.Tests (79), Akka.Persistence.Tests (24), Akka.Streams.Tests (12), Akka.Cluster.Tools.Tests (59), Akka.Cluster.Sharding.Tests (25), Akka.DistributedData.Tests (31) and Akka.Cluster.Metrics.Tests (9). HostingBuiltInSerializerSpecs: 2 passed.RemoteSerializerslocally. The snapshot test failed with the expected diff both times, and I reverted both.scripts/CheckAotWarnings.csreports no new warnings. The commits since touch tests, docs and the new version-skew error log only.