-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: various changes to fix backpressure (#2721)
* Reworked the binary decoder so that the binary data is not transferred from the I/O scheduler until the decoder is ready for it (previously this transfer was happening in the indirect task) * Significantly modified the I/O scheduler. It now uses a custom queue instead of a simple priority queue. This queue manages both the # IOPS limit and the # bytes in flight limit. * Scans now set the file priority explicitly. Before the ScanScheduler was using a counter but since we open fragments in parallel this meant that earlier fragments might not get the lowest priority which was leading to out-of-order scheduling. * Removed the deadlock prevention timeout. Now, we avoid deadlock by allowing the backpressure limit to be slightly violated. We keep track of the priority of all in-flight requests. If a new request comes in that is lower priority than any in-flight request we go ahead and allow it even if it would violate backpressure. In practice, this means only a few extra requests sneak in and overall backpressure is maintained. We can improve this in the future once we move to a max of 2 levels of indirection by having indirect requests estimate how many bytes they will need.
- Loading branch information
1 parent
1a52b94
commit 30b3df7
Showing
15 changed files
with
476 additions
and
341 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
Oops, something went wrong.