pjfanning commented on code in PR #3701:
URL: https://github.com/apache/pekko/pull/3701#discussion_r4367756770
##########
cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala:
##########
@@ -548,6 +548,12 @@ private[pekko] class Shard(
receiveLeaseLost(ll)
case me: MemberEvent =>
receiveMemberEvent(me)
+ case HandOff(`shardId`) =>
+ // no entities have been started while awaiting the lease, so hand off
completes immediately;
+ // stashing it would prevent the rebalance from completing while the
lease is unobtainable
+ handOff(sender())
Review Comment:
Anything already stashed in `awaitingLease` is lost when the shard stops
here: `postStop` returns the stash to the mailbox and it goes to dead letters.
That includes `GetCurrentShardState` / `GetShardStats` queries forwarded by the
region, and `StartEntity` from `RememberEntityStarterManager`, so those callers
get no reply and just time out. Is that acceptable, or should we reply to or
forward those before handing off?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]