Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shutdown metrics actors more gracefully #4396

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrew-nowak
Copy link
Member

What does this change?

On shutdown, Play sends the metrics actors a shutdown message, but as it uses an 'ask', it waits for a response. When no response arrives, it assumes something has gone wrong and shuts down with a more severe error. Sometimes (possibly not always?) this can also interrupt Play's dev mode (recompiling and restarting the app on code changes).

In fact nothing has gone wrong (usually), we simply don't bother to send a response. Let's do that, both to be graceful, and to enable slightly faster shutdowns. The actual message sent is unimportant, as the requester does nothing with it, so send Unit.

How should a reviewer test this change?

Run locally, then stop the app. Does the app finish faster? Do the logs contain fewer shutdown related errors. (Currently some will end with errors that an actor did not respond within 5 seconds).

How can success be measured?

Faster shutdowns, fewer errors, more uninterrupted dev mode.

Who should look at this?

Tested? Documented?

  • locally by committer
  • locally by Guardian reviewer
  • on the Guardian's TEST environment
  • relevant documentation added or amended (if needed)

On shutdown, Play sends the metrics actors a shutdown message, but as it uses an 'ask', it waits for a response. When no response arrives, it assumes something has gone wrong and shuts down with a more severe error.

In fact nothing has gone wrong (usually), we simply don't bother to send a response. Let's do that, both to be graceful, and to enable slightly faster shutdowns
@andrew-nowak andrew-nowak requested review from a team as code owners January 13, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant