The GitHub Actions job "Pull Requests" on 
pekko.git/fix/remote-send-consistency-flaky has succeeded.
Run started by GitHub user He-Pin (triggered by He-Pin).

Head commit for run:
658433a1684b35481f46d904cd5820870fa69e95 / 虎鸣 <[email protected]>
fix(artery): distribute ActorSelection messages across lanes by target path

Motivation:
The "must be able to send messages with actorSelection concurrently
preserving order" test flakes on CI: 4 sender actors each drive 1000
round-trips via ActorSelection (4004 messages total). With multi-lane
artery config (outbound-lanes > 1), all ActorSelection messages are
routed to the same outbound queue because selectQueue uses the anchor's
UID as the distribution key. The anchor for ActorSelection is the root
guardian (RootActorPath), whose UID is always 0 (ActorCell.undefinedUid).
So math.abs(0 % N) = 0 for any N — all ActorSelection traffic
concentrates on lane 0 while other lanes sit idle.

Similarly, inbound lane partitioning uses the wire recipient's UID
(root guardian = 0), concentrating all inbound ActorSelection processing
on a single inbound lane.

Modification:
Outbound: Add a dedicated case for ActorSelectionMessage in
Association.send that computes the queue index from the selection's
target path elements hash instead of the anchor's UID. PriorityMessage
ActorSelection (cluster heartbeats) continues going through the control
queue.

Inbound: Update ArteryTransport.inboundLanePartitioner to parse the
ActorSelectionMessage's target path from the envelope byte buffer and
use it as the destination hash key, distributing inbound ActorSelection
processing across all inbound lanes.

Result:
ActorSelection messages are distributed across all outbound and inbound
lanes based on target path, eliminating the single-lane throughput
bottleneck while preserving per-path message ordering.

Tests:
sbt -Dpekko.test.timefactor=2 "remote / Test / testOnly
  *SendConsistency*" — 24/24 passed (all 6 spec variants)
sbt "remote / mimaReportBinaryIssues" — clean

References:
Fixes #3089

Report URL: https://github.com/apache/pekko/actions/runs/27851792474

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to