-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deadlock when Stop and flush race (#1430)
Fixes #1428. Stop signals the flush loop to end, but if the flush ticker has fired after we took the lock, then it tries to `Sync`, and waits for the same lock that `Stop` is holding. This causes a deadlock, as `Stop` holds the lock waiting for flush to end. Fix by waiting for the flush loop to end outside of the critical section. We only need to wait (and call Sync) if the write syncer has been initialized and stopped.
- Loading branch information
Showing
2 changed files
with
20 additions
and
11 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