-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
53f38d6
commit eaaaaa7
Showing
8 changed files
with
60 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters