You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/03/23 15:06:59 UTC
[I] `StopShards` currently calls `shutdownShards(self, ...)`, which makes the rebalance worker send `HandOff` to the coordinator itself instead of to the region that actually hosts the shard. This will prevent shards from stopping and the caller will never receive the expected `ShardStopped` acks. Consider looking up each shard’s current region from `state.shards` and using that as the `from`/`shuttingDownRegion` when initiating the handoff. [pekko]
pjfanning opened a new issue, #2782:
URL: https://github.com/apache/pekko/issues/2782
`StopShards` currently calls `shutdownShards(self, ...)`, which makes the rebalance worker send `HandOff` to the coordinator itself instead of to the region that actually hosts the shard. This will prevent shards from stopping and the caller will never receive the expected `ShardStopped` acks. Consider looking up each shard’s current region from `state.shards` and using that as the `from`/`shuttingDownRegion` when initiating the handoff.
```suggestion
// Initiate handoff from the actual hosting regions instead of from the coordinator itself
val shardsWithRegion: Iterable[(ActorRef, ShardId)] =
shards.flatMap { shardId =>
state.shards.get(shardId).map(regionRef => (regionRef, shardId))
}
shardsWithRegion
.groupBy(_._1)
.foreach {
case (regionRef, regionShards) =>
shutdownShards(regionRef, regionShards.map(_._2))
}
```
_Originally posted by @Copilot in https://github.com/apache/pekko/pull/2755#discussion_r2971318005_
--
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: notifications-unsubscribe@pekko.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [I] potential `StopShards` issue raised by Copilot [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning closed issue #2782: potential `StopShards` issue raised by Copilot
URL: https://github.com/apache/pekko/issues/2782
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [I] potential `StopShards` issue raised by Copilot [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #2782:
URL: https://github.com/apache/pekko/issues/2782#issuecomment-4111414661
I suspect https://github.com/akka/akka-core/pull/31859 may be part of sorting this issue
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [I] potential `StopShards` issue raised by Copilot [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on issue #2782:
URL: https://github.com/apache/pekko/issues/2782#issuecomment-4116173014
#2783 merged
--
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: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org