-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deadlock and race condition in proposal fetching (#2379)
* Fix deadlock and race condition in proposal fetching * Change from broadcast channel to multi-consumer channel. This means only one fetcher task will receive each proposal to be fetched, which is the actual behavior we want. Before, with broadcast, we had multiple fetchers always fetching the same proposal, which is why we saw race conditions causing database serialization errors. It should now be possible to reenable multiple workers. * Use an unbounded channel. This prevents a deadlock where a consumer sends back into the channel (e.g. to recursively fetch the parent of the proposal it had just fetched), but the channel is full, blocking the consumer, the very task responsible for clearing the blockage. * Add metrics for proposal fetcher
- Loading branch information
Showing
9 changed files
with
275 additions
and
187 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
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
Oops, something went wrong.