quickwit-oss / quickwit-oss/quickwit

Consider `ActorExitStatus::Quit` as a successful exit?

Open
#2,150 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.