nvollmar opened a new issue, #1341:
URL: https://github.com/apache/pekko/issues/1341
We encounter hundreds of these during a node shutdown
```
unhandled message from
Actor[pekko://main/system/sharding/transactionsAggregates#-1585167465] to
Actor[pekko://main/system/sharding/transactionsAggregates/4#-516417762]:
ShardsUpdated(5)
```
Root cause is to link to link `ShardRegion` sending updates for each
terminated shard when passivation strategy is used:
```
if (settings.passivationStrategy !=
ClusterShardingSettings.NoPassivationStrategy) {
shards.values.foreach(_ ! ShardsUpdated(shards.size))
}
```
See
[here](https://github.com/apache/pekko/blob/3fff73894bf339722b2e4d7a4a5491b1de4ca6a9/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/ShardRegion.scala#L1006)
That message is not handled/ignored by the `Shard` during termination:
```
context.become {
case Terminated(ref) => receiveTerminated(ref)
}
```
See
[here](https://github.com/apache/pekko/blob/3fff73894bf339722b2e4d7a4a5491b1de4ca6a9/cluster-sharding/src/main/scala/org/apache/pekko/cluster/sharding/Shard.scala#L895)
There would be two ways to fix this:
1. At this time the `ShardRegion` property `gracefulShutdownInProgress` is
already set to `true` - check for that in the if and don't send any more
updates
2. During termination in the `Shard` match and ignore the `ShardsUpdated`
--
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]