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

Consider ActorExitStatus::Quit as a successful exit? #2150

Open
fmassot opened this issue Oct 19, 2022 · 0 comments
Open

Consider ActorExitStatus::Quit as a successful exit? #2150

fmassot opened this issue Oct 19, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@fmassot
Copy link
Contributor

fmassot commented Oct 19, 2022

Currently, an exit with a status different from Success will generate a log error, and the state ends up as ActorState::Failure.

The code is like this:

  if !exit_status.is_success() {
      error!(actor_name=self.actor_instance_id(), actor_exit_status=?exit_status, "actor-failure");
  }
self.actor_state.exit(exit_status.is_success());

But, the happy path can only happen if all mailboxes are dropped (except the one owned by the context). Taking care of dropping all mailboxes is a bit of a chore and is error-prone.

Another way to gracefully shutdown an actor is by calling actor_handle.quit(), this is a nice way to stop an actor, unfortunately, it generates an ERROR log and the actor state will become Actor::Failure which can misleading. We could consider this as a successful operation and not log an ERROR and have a final state Actor::Success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant