-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: move copy to preflight to adapter
A copy to operation involves some preflight checks: validating that the requested prefix of S3 is empty, and writing an INCOMPLETE sentinel file. Previously these checks were run as the first operation on every replica participating in the copy to operation. This was racy though: a lagging replica could write the INCOMPLETE sentinel file *after* the leading replica finished the copy and had thus *deleted* the INCOMPLETE sentinel file. Since the lagging replica's work is canceled once the leading replica's work is finished, this could result in a INCOMPLETE sentinel file that never got removed. This commit moves these preflight checks to the adapter, where they are performed exactly once before any replica is notified of the copy to operation. This ensures that the INCOMPLETE file is written at most once in an copy to operation, and in particular that lagging replicas can't cause the file to reappear afer the leading replica finishes the operation.
- Loading branch information
Showing
7 changed files
with
151 additions
and
119 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.