-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
10683: Ensure raft storage lock file is update atomically r=deepthidevaki a=deepthidevaki ## Description Previously the file creation and updating the contents were not done atomically. Moreover the content of the files were not flushed immediately. Because of this, if the pod restarts there is a chance the lock file exists but it is empty. As a result, a new lock cannot be acquired and the partition startup fails. To fix this, we first the write to a temporary file with "SYNC" option and then move the file atomically to the actual lock file. Existing tests are refactored. No new test is added to verify this, as it is difficult to simulate crashes while acquiring the lock. ## Related issues closes #10681 Co-authored-by: Deepthi Devaki Akkoorath <deepthidevaki@gmail.com>
- Loading branch information
Showing
2 changed files
with
60 additions
and
46 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