Repository navigation
Artery: fix control-queue sizing, overflow observability, and shutdown races - #8346
Merged
Aaronontheweb merged 1 commit intoJul 9, 2026
Conversation
Member
Author
|
One review suggestion: in the new |
Aaronontheweb
marked this pull request as ready for review
July 9, 2026 18:32
Aaronontheweb
commented
Jul 9, 2026
| /// <c>akka.remote.artery.advanced.outbound-control-queue-size</c> (<see cref="ArterySettings.OutboundControlQueueSize"/>). | ||
| /// </summary> | ||
| public const int DefaultControlQueueCapacity = 256; | ||
| public const int DefaultControlQueueCapacity = 20_000; |
| // caused spurious quarantines under a mass-termination Unwatch burst) rather than the | ||
| // registry's own hardcoded defaults -- see ArterySettings.OutboundMessageQueueSize / | ||
| // OutboundControlQueueSize. | ||
| _registry = new AssociationRegistry(_settings.OutboundMessageQueueSize, _settings.OutboundControlQueueSize); |
Aaronontheweb
enabled auto-merge (squash)
July 9, 2026 18:42
…n races The control queue default was 78x too small (256), so a mass-Unwatch termination burst against a healthy peer could spuriously quarantine it; the default is now 20000 (Pekko's outbound-control-queue-size), with new HOCON knobs outbound-control-queue-size and outbound-message-queue-size. Ordinary-queue overflow now publishes a Dropped event directly to the event stream instead of a raw DeadLetters Tell. Stream materialization that races actor-system termination no longer surfaces an uncaught InvalidOperationException, and a throwing materialize callback no longer strands the materialize-once gate.
Aaronontheweb
force-pushed
the
fix/artery-queue-and-shutdown-robustness
branch
from
July 9, 2026 19:08
3f4c2cd to
fa62d82
Compare
Aaronontheweb
disabled auto-merge
July 9, 2026 19:52
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.
Three related Artery robustness fixes.
Control queue sizing. The control queue's default capacity (256) was 78x smaller than Pekko's
outbound-control-queue-sizedefault, so a mass-Unwatchburst during teardown of a system with a few thousand remote watches could overflow it and spuriously quarantine a perfectly healthy peer. The default is now 20000.Overflow observability. Ordinary-outbound-queue overflow was dead-lettered via a raw
DeadLetters.Tell, which double-wraps and hid the reason. It now publishes aDroppedevent directly to the event stream (mirroring Pekko'sAssociation.dropped()), so the standardDeadLetterListenerlogging and anyDroppedsubscribers see the message and the reason.Shutdown races. Materializing a new outbound stream while the actor system is terminating threw an uncaught
InvalidOperationExceptionfrom the terminatingStreamSupervisor(the existing guard only caughtIllegalStateExceptionbehind shutdown flags that lag/user-guardian teardown); that exception is now treated as the shutdown signal it is and swallowed at Debug. A companion fix stops a throwing materialize callback from permanently stranding the materialize-once gate.New HOCON knobs:
akka.remote.artery.advanced.outbound-control-queue-size(20000) andakka.remote.artery.advanced.outbound-message-queue-size(3072, unchanged default).Tests: new mass-Unwatch no-quarantine regression test, new shutdown-race spec (verified to fail with the fix reverted),
Dropped-event assertions on the existing overflow test, and config round-trip coverage for the new knobs.