Skip to content

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

Merged
Stebalien merged 1 commit intomasterfrom
fix/remove-temporary-files-put-many
Apr 10, 2020
Merged

fix: remove temporary files when multiple write operations conflict#76
Stebalien merged 1 commit intomasterfrom
fix/remove-temporary-files-put-many

Conversation

@Stebalien
Copy link
Copy Markdown
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 requested a review from willscott April 10, 2020 21:54
@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.

2 participants