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

Make ObjectStore::copy Atomic and Automatically Create Parent Directories (#4758) (#4760) #4759

Merged
merged 6 commits into from
Sep 2, 2023

Conversation

tustvold
Copy link
Contributor

@tustvold tustvold commented Aug 31, 2023

Which issue does this PR close?

Closes #4758
Closes #4760

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the object-store Object Store Interface label Aug 31, 2023
@tustvold tustvold marked this pull request as ready for review September 1, 2023 10:36
@tustvold tustvold changed the title Make LocalFileSystem::copy atomic (#4758) Make ObjectStore::copy Atomic and Automatically Create Parent Directories (#4758) (#4760) Sep 1, 2023
}
// Some implementations return 404 instead of 409
Some(StatusCode::CONFLICT | StatusCode::NOT_FOUND) if !retry => {
retry = true;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We copy the loop protection from the other http methods, this is necessary here because HTTP implementations may return StatusCode::Conflict for other reasons

Copy link
Member

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Thanks for fixing this!

@tustvold tustvold merged commit 6e28c03 into apache:master Sep 2, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
object-store Object Store Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LocalFileSystem Copy and Rename Don't Create Intermediate Directories LocalFileSystem Copy is not Atomic
2 participants