Repository navigation
AOT (6/7): remove UDP buffer pooling, keep the DNS provider configurable through a built-in table - #8606
Merged
Aaronontheweb merged 1 commit intoSep 25, 2026
Conversation
Aaronontheweb
added this pull request to stack #8607
September 23, 2026 02:07
6 tasks done
Aaronontheweb
deleted the
aot/io-dns-and-buffer-pool-not-configurable
branch
September 23, 2026 02:24
Aaronontheweb
restored the
aot/io-dns-and-buffer-pool-not-configurable
branch
September 23, 2026 02:42
Aaronontheweb
force-pushed
the
aot/io-dns-and-buffer-pool-not-configurable
branch
from
September 23, 2026 02:46
51b73ef to
225875c
Compare
Aaronontheweb
force-pushed
the
aot/io-dns-and-buffer-pool-not-configurable
branch
from
September 23, 2026 14:19
225875c to
b3b0bc4
Compare
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Aaronontheweb
force-pushed
the
aot/io-dns-and-buffer-pool-not-configurable
branch
from
September 23, 2026 14:47
b3b0bc4 to
b375cdd
Compare
Aaronontheweb
force-pushed
the
aot/io-dns-and-buffer-pool-not-configurable
branch
from
September 23, 2026 18:09
b375cdd to
b871cf3
Compare
Aaronontheweb
force-pushed
the
aot/io-dns-and-buffer-pool-not-configurable
branch
3 times, most recently
from
September 24, 2026 03:31
00b0f52 to
27bf822
Compare
Aaronontheweb
force-pushed
the
aot/io-dns-and-buffer-pool-not-configurable
branch
from
September 24, 2026 13:58
27bf822 to
fcd701c
Compare
Aaronontheweb
force-pushed
the
aot/io-dns-and-buffer-pool-not-configurable
branch
from
September 24, 2026 15:26
fcd701c to
212e2a0
Compare
Aaronontheweb
commented
Sep 24, 2026
Aaronontheweb
left a comment
Member
Author
There was a problem hiding this comment.
Not quite there - we don't want to make buffer pools configurable at all for Akka.IO. That's an over-engineered feature we don't need to keep supporting.
Aaronontheweb
removed this pull request from stack #8607
September 24, 2026 16:42
Aaronontheweb
changed the base branch from
feature/aot-m1-e-routers-guardian-dispatchers
to
aot/m1-e-routers-guardian-dispatchers
September 24, 2026 16:42
Aaronontheweb
added this pull request to stack #8632
September 24, 2026 16:43
Aaronontheweb
force-pushed
the
aot/io-dns-and-buffer-pool-not-configurable
branch
from
September 24, 2026 16:44
212e2a0 to
81e5d26
Compare
Aaronontheweb
force-pushed
the
aot/io-dns-and-buffer-pool-not-configurable
branch
from
September 24, 2026 17:00
81e5d26 to
7e92eaa
Compare
…rough a built-in table
The first version of this change tried to keep two reflection-driven hooks alive under a
feature switch. Neither one earned that: one had never had a second implementation, and the
other had no live callers at all. This redoes both from scratch.
UDP buffer pools. DirectBufferPool pooled byte buffers; DisabledBufferPool allocated a fresh
one every time. disabled-buffer-pool was the shipped default, and nothing here or in a
support ticket ever asked for the other one. UdpExt and UdpConnectedExt now construct
DisabledBufferPool directly from each extension's own disabled-buffer-pool section, reading
only its buffer-size key. DirectBufferPool is deleted outright, along with buffer-pool, class
and the direct-buffer-pool sections in akka.conf, and the duplicated CreateBufferPool
reflection helper. IBufferPool, BufferPoolInfo and BufferPoolAllocationException are
untouched (moved into a renamed IBufferPool.cs), so the API approval baselines do not move.
Pooling cannot be re-enabled: anyone who pointed buffer-pool at direct-buffer-pool with a
larger buffer-size must move that value to disabled-buffer-pool.buffer-size, or datagrams
over the new default of 512 bytes get truncated on receive -- called out in the ledger.
akka.io.tcp.buffer-pool / direct-buffer-pool / disabled-buffer-pool are also gone from
akka.conf. TcpExt never read them -- TcpSettings.BufferPoolConfigPath has carried
[Obsolete("This property is unused")] since before this change. Both MultiNodeTestCaseRunner
adapters set akka.io.tcp.buffer-pool to disabled-buffer-pool and pointed its buffer-size at
TcpBufferSize; that configured nothing and is deleted. TcpHorizontalScaleSpec had the same
dead block. TcpBufferSize itself stays: TcpLoggingServer uses it as a segment-size heuristic
unrelated to Akka.IO's buffer pools.
DNS provider. provider-object is a real extension point, so it stays configurable in both
feature-switch states, matching how PRs A-E treat every other built-in-but-overridable HOCON
type name. DnsExt resolves it through a BuiltInDnsProviders table before falling back to
Type.GetType + Activator.CreateInstance, which now only runs while Akka.DynamicTypeLoading is
on and lives behind [RequiresUnreferencedCode]. With the switch off, a provider-object that
isn't the built-in provider throws ConfigurationException via AkkaFeatures.NotBuiltIn instead
of being silently ignored with a warning.
DnsExt.Manager builds SimpleDnsManager with a typed Props.Create lambda, and SimpleDnsManager
builds InetAddressDnsResolver the same way, instead of Props.Create(Type, args) off
IDnsProvider.ManagerClass/ActorClass. A custom provider keeps the reflection path in both
places behind its own [RequiresUnreferencedCode] helper. The guard at each call site checks
Provider.GetType() == typeof(InetAddressDnsProvider) rather than an `is` check, since a
subclass could re-implement IDnsProvider, with the switch checked first so it still folds
under trimming. Confirmed with a rooted Akka.AOT.App publish: the five IO/* trim warnings
this removes (two Type.GetType sites for the buffer pools, one for the provider, two
Props.Create(Type, ...) sites for its manager and resolver) stay at zero.
Tests: DnsProviderConfigSpec (default config resolves DNS end to end with the switch off;
every accepted spelling of the built-in provider name resolves with the switch off; a custom
provider loads and resolves end to end with the switch on; a custom provider throws
ConfigurationException with the switch off) and UdpDisabledBufferPoolSpec, which checks the
configured buffer-size is actually used rather than round-tripping a packet. Dropped three
tautological "must not leak memory" tests against DisabledBufferPool, whose Diagnostics()
always returns 0/0/0 and so could never fail.
Ledger: two BREAKING_CHANGES_V1.6.md entries -- UDP pooling removed outright (Behavior, not
Behavior + API, since DirectBufferPool was internal), with the buffer-size migration note; DNS
provider resolution gated on the feature switch rather than downgraded to a warning.
Aaronontheweb
force-pushed
the
aot/io-dns-and-buffer-pool-not-configurable
branch
from
September 25, 2026 00:46
7e92eaa to
6c089a7
Compare
Aaronontheweb
deleted the
aot/io-dns-and-buffer-pool-not-configurable
branch
September 25, 2026 02:11
This was referenced Sep 25, 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.
Changes
Removes two HOCON type-name hooks from Akka.IO, and keeps the one that is a real extension point.
UDP buffer pools: removed.
DirectBufferPoolwas internal, off by default, and never asked for.UdpExtandUdpConnectedExtalways constructDisabledBufferPool, reading onlydisabled-buffer-pool.buffer-size.DirectBufferPool, theCreateBufferPoolreflection helper in both extensions, and thebuffer-pool/class/direct-buffer-poolconfig for udp and udp-connected.IBufferPool,BufferPoolInfoandBufferPoolAllocationExceptionstay, now inIBufferPool.cs.UdpSettings.BufferPoolConfigPathis marked[Obsolete], matchingTcpSettings.BufferPoolConfigPath.akka.io.tcpbuffer-pool config goes too (TcpExtnever read it), along with the test-adapter and perf-spec lines that set it.DNS provider: stays configurable, through the standard built-in table.
provider-objectkeeps its meaning.InetAddressDnsProvidercomes from aBuiltInDnsProviderstable.Akka.DynamicTypeLoadingis on, and throwsConfigurationException(AkkaFeatures.NotBuiltIn) while it's off.SimpleDnsManagerandInetAddressDnsResolverare built with typed constructors. A custom provider keeps theProps.Create(Type, ...)path, which is[RequiresUnreferencedCode]and guarded so the trimmer drops it when the switch is off.Akka.AOT.Apppublish loses the five targetedIO/*trim warnings, and nothing else regresses.Tests
DnsProviderConfigSpec: DNS resolves end to end with the switch off; the built-in name's spellings resolve; a custom provider loads with the switch on and throws with it off.UdpDisabledBufferPoolSpec: the configuredbuffer-sizeis read.DisabledBufferPoolreports zero usage.Ledger: two rows. The UDP row includes the migration step: move a custom
buffer-sizetodisabled-buffer-pool.buffer-size, or datagrams larger than 512 bytes are cut off.Also updates the
coordinated-shutdown.mdsnippet range, which points intoakka.conf.Stack: PR 6 of 7 for AOT milestone 1. It isn't on the local boot path. Design and measurements: epic #7246.
Checklist
UdpSettings.BufferPoolConfigPathgains[Obsolete]; no other public API change.