-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #618 - Mark-Simulacrum:opt, r=Mark-Simulacrum
Move record-progress processing to separate thread This is intended to let us prioritize work on other requests over work on record-progress, thereby avoiding some of the timeouts and "database is locked" errors we would otherwise see when the record-progress requests happen to take priority. This separate thread is designed to only run when the server has no requests in-flight (other than a short, bounded, queue of record-progress requests). If that queue fills up, we will tell workers to slow down, causing them to retry requests -- currently at fixed intervals and per worker thread, but a future commit might clean that up a little to have a more intentional delay. In general this should, hopefully, decrease the error rate as particularly human-initiated requests should never have to wait for more than one record-progress event to complete before having largely uncontended access to the database. (Other requests still happen concurrently, but requests are typically very rare in comparison to record-progress which are multiple times a second, effectively constantly processing). Errors like rust-lang/rust#94775 (comment) are the primary motivation here, which I hope this is enough to largely clear up.
- Loading branch information
Showing
7 changed files
with
188 additions
and
73 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.