Skip to content

Artery: order DaemonMsgCreate ahead of Watch and retry early inbound resolves - #8414

Merged
Aaronontheweb merged 2 commits into
devfrom
fix/artery-daemonmsgcreate-control-stream
Jul 19, 2026
Merged

Aaronontheweb merged 2 commits into
devfrom
fix/artery-daemonmsgcreate-control-stream

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Member

Remote deployment over Artery sent DaemonMsgCreate on the ordinary stream while the Watch that immediately follows rode the control stream — two TCP connections with no cross-stream ordering. The Watch systematically arrives first, the receiver watches a not-yet-created actor and replies DeathWatchNotification(existenceConfirmed: false), and the deployer reaps the freshly-deployed routee before its Supervise registration lands — leaving cluster router pools empty. Deterministic on both platforms; found via the Artery MNTR lanes on #8373 and reproduced locally with receiver-side logs. Classic remoting is unaffected.

The fix ports both halves of Pekko's mechanism: DaemonMsgCreate rides the control stream (ordering it ahead of the Watch, per Association.scala), and because first ordinary messages can now precede the create, the inbound path retries recipient resolution for remote-deployed actors with Pekko's bounded schedule (Codecs.scala) before dead-lettering. Fixes all five failing router MNTR specs over Artery.

…resolves

Remote deployment sent DaemonMsgCreate on the ordinary stream while the Watch that follows rode the control stream - no cross-stream ordering, so the Watch systematically arrived first and the deployer reaped the not-yet-created routee. Route DaemonMsgCreate over the control stream (Pekko parity) and, since first ordinary messages can now precede the create, port Pekko's bounded resolve-retry for remote-deployed recipients on the inbound path.
Buffered first-messages for not-yet-created remote-deployed recipients could vanish silently if shutdown landed between retry ticks, and a late inbound frame could schedule against a stopped timer. Drain the buffers to Dropped alongside the outbound drains and guard the buffer path with the shutdown flag.
@Aaronontheweb
Aaronontheweb merged commit 010e0fd into dev Jul 19, 2026
11 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/artery-daemonmsgcreate-control-stream branch July 19, 2026 01:12
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.

1 participant