Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove temporary files when multiple write operations conflict #76

Merged
merged 1 commit into from Apr 10, 2020

Conversation

Stebalien
Copy link
Member

When multiple write operations conflict, we:

  1. Try them in-order till one succeeds.
  2. After the fact, re-order them such that the pending operations "happen" after the one that succeeds.
  3. Return "success" for all the pending write operations for that key. This is acceptable because we're claiming that the operation that actually succeeded happened "last" so it would have clobbered the other operations.

However, in the case of put, we still need to remove the temporary file that we didn't end up moving into place.

@Stebalien Stebalien force-pushed the fix/remove-temporary-files-put-many branch 3 times, most recently from 7ba8294 to 69cc2bc Compare April 10, 2020 22:22
When multiple write operations conflict, we:

1. Try them in-order till one succeeds.
2. After the fact, re-order them such that the pending operations "happen" after
   the one that succeeds.
3. Return "success" for all the pending write operations for that key. This is
   acceptable because we're claiming that the operation that _actually_ succeeded
   happened "last" so it would have clobbered the other operations.

However, in the case of put, we still need to remove the temporary file that we
didn't end up moving into place.
@Stebalien Stebalien force-pushed the fix/remove-temporary-files-put-many branch from 69cc2bc to 579b3c8 Compare April 10, 2020 22:34
@Stebalien Stebalien merged commit 319998e into master Apr 10, 2020
@Stebalien Stebalien deleted the fix/remove-temporary-files-put-many branch April 10, 2020 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants