-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix data race when calling get metadata (#562)
* Fix bug stuck in propose The leader after a restart would grab the leader token and wait for a non-empty batch. In the new test the view thread of the leader after the restart is just about to call controller decide. However, before the provided fix, the controller is busy waiting for a new batch. Without any new transactions, the leader is stuck. In the fix, if the new batch is empty, the controller continues while reacquiring the leader token, thus allowing the view to call decide. Signed-off-by: Фёдор Партанский <pfi79@mail.ru> * Fix data race when calling GetMetadata. The leader after a restart would grab the leader token and propose while also calling GetMetadata. In the test the view thread of the leader after the restart is just about to call startNextSeq. This causes a data race. In the fix, the leader token is acquired only when the view is not in the middle of a decisionFix data race when calling GetMetadata. Signed-off-by: Фёдор Партанский <pfi79@mail.ru> --------- Signed-off-by: Фёдор Партанский <pfi79@mail.ru> Co-authored-by: Hagar Meir <hagar.meir@ibm.com>
- Loading branch information
Showing
6 changed files
with
118 additions
and
12 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
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