quickwit-oss / quickwit-oss/quickwit
Consider `ActorExitStatus::Quit` as a successful exit?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 11.7k
- Forks
- 597
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 37
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the Rust codebase for the shown exit_status.is_success() branch and ActorExitStatus::Quit, then read how actor_handle.quit() affects ActorState. Done means quit exits no longer log an ERROR and leave the actor in a failure state, with behavior verified by the relevant existing actor tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100