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

Fixing bug that was causing the Indexer to stay busy in cooperative m… #4452

Merged
merged 4 commits into from
Jan 25, 2024

Commits on Jan 24, 2024

  1. Fixing bug that was causing the Indexer to stay busy in cooperative m…

    …ode.
    
    Removing the difference between Idle and Processing.
    It was originally introduced with the idea of measure how long actors
    where busy or idle, but tokio-console does that job very well now.
    
    The code was relying on the enforcement of the non trivial state machine:
    calling .idle() in the pause state had no effect for instance.
    
    The real bug however showed up with the following sequence of event:
    - indexer drains its queue
    - on_drain is called
    - indexer "goes to sleep" by putting itself in the Pause state.
    - a low priority message is queued into the low priority queue.
    - indexer receives a high priority message (Observe is sent every second).
    - indexer would go through the loop logic consuming the entire pipeline,
      but only consuming high priority messages. The `inbox.is_empty()` exit
      condiition is never satisfied, so that this loop would keep going,
      yielding at each iteration, until the Resume Command is received.
    
    This is done on the indexer runtime.
    The task would always be busy, but yield all of the time, consuming the
    whatever room is available on the thread it is consuming.
    
    Closes #4448
    fulmicoton committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    eaaaaa7 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. Apply suggestions from code review

    Co-authored-by: Adrien Guillo <[email protected]>
    fulmicoton and guilload authored Jan 25, 2024
    Configuration menu
    Copy the full SHA
    ee5bfb2 View commit details
    Browse the repository at this point in the history
  2. Minor changes

    fulmicoton committed Jan 25, 2024
    Configuration menu
    Copy the full SHA
    b52faa1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c217ff6 View commit details
    Browse the repository at this point in the history