-
Notifications
You must be signed in to change notification settings - Fork 415
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… (
#4452) * Fixing bug that was causing the Indexer to stay busy in cooperative mode. 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 Co-authored-by: Adrien Guillo <[email protected]>
- Loading branch information
1 parent
03b9b0b
commit a2e3b92
Showing
8 changed files
with
65 additions
and
109 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