pjfanning opened a new pull request, #3644:
URL: https://github.com/apache/pekko/pull/3644
### Motivation
During shard hand off, `Shard` reduced `hand-off-timeout` by 5 seconds
(minimum 1 second) before passing it to
`HandOffStopper`, which then logged that reduced value as the hand off
timeout. The early warning also said it would
wait the full timeout again although only the remainder was left, and the
warning timer was not cancelled when the
stop timeout fired first.
### Modification
- `Shard` passes the configured `hand-off-timeout` to `HandOffStopper`,
which derives the entity stop timeout itself.
- The early warning logs the remaining wait time.
- The warning timer is cancelled when the stop timeout fires.
- `ClusterShardingInternalsSpec` expectations widened, since the
`HandOffStopper` entity stop timeout is now at
least 1 second.
### Result
Hand off warnings report accurate timeouts. The effective entity stop
timeout used during hand off is unchanged.
### Tests
Not run locally - left to CI
### References
Ported from (Apache-2.0 since 2026-10-23):
- https://github.com/akka/akka-core/pull/32181
### Notes for reviewers
- No change in effective behaviour for the shard: entities are still force
stopped after `hand-off-timeout - 5s`
(min 1s). Direct users of the internal `HandOffStopper` now get that
reduction applied inside the actor, so a
value below 1 second is raised to 1 second.
- `HandOffStopper` is `@InternalApi private[pekko]`; signatures are
unchanged, no MiMa excludes.
- No config changes, no wire format changes.
--
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]