Skip to content

Bound Artery stream shutdown#3317

Open
He-Pin wants to merge 1 commit into
apache:mainfrom
He-Pin:fix/3247-bound-artery-shutdown
Open

Bound Artery stream shutdown#3317
He-Pin wants to merge 1 commit into
apache:mainfrom
He-Pin:fix/3247-bound-artery-shutdown

Conversation

@He-Pin

@He-Pin He-Pin commented Jul 10, 2026

Copy link
Copy Markdown
Member

Motivation

Artery waits without a deadline for remoting stream completion during ActorSystem termination. A stalled stream can therefore prevent transport-specific shutdown from starting and keep the actor system alive indefinitely.

Modification

  • Add pekko.remote.artery.advanced.shutdown-streams-timeout with a 10-second default.
  • Continue with transport shutdown when graceful stream completion exceeds that deadline.
  • Continue with transport shutdown if the system scheduler is already unavailable.
  • Preserve the normal streams-before-transport ordering and shutdown idempotency.
  • Document the setting and add directional regression coverage for both timeout paths.

Result

A stalled remoting stream no longer blocks Artery transport shutdown indefinitely.

References

Fixes #3247

Motivation:
Artery waited without a deadline for remoting stream completion during termination, so a stalled stream could block transport shutdown indefinitely.

Modification:
Add a configurable stream shutdown timeout, continue with transport cleanup when it expires or the scheduler is unavailable, document the setting, and add directional regression coverage.

Result:
Stalled remoting streams no longer prevent Artery transport shutdown, while the normal streams-before-transport ordering remains unchanged.

Tests:
- Aeron ArteryTransportShutdownSpec and FlushOnShutdownSpec: 3 tests passed
- sbt +mimaReportBinaryIssues: passed
- sbt +headerCheckAll: passed
- sbt docs/paradox: passed
- sbt checkCodeStyle: passed
- sbt sortImports: not completed due installed Scalafix/Scalameta binary incompatibility
- sbt validatePullRequest: not run per request

References:
Fixes apache#3247
@He-Pin He-Pin force-pushed the fix/3247-bound-artery-shutdown branch from 1d440ba to 263965a Compare July 10, 2026 22:56
@He-Pin He-Pin added this to the 2.0.0-M4 milestone Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Artery ActorSystem termination slow for Aeron-UDP transport due to stacked liveness timeouts

1 participant