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 the combination of get and set idempotent #287

Merged
merged 6 commits into from
Aug 21, 2024

Conversation

aliddell
Copy link
Member

@aliddell aliddell commented Aug 15, 2024

  • Use std::string when generating paths from StorageProperties::uri.
  • Removes a redundant check of directory existence.
  • Fixes a bug wherein web URIs are prepended with "file://"

@aliddell
Copy link
Member Author

When you get the storage properties from the Zarr driver, if it's a I can't work out exactly why I was seeing this behavior when using strcmp but previously one would get properties and see a "file://" prefix. Taking that value and resetting it would fail to cut out the "file://" prefix, using strcmp anyway. I can't work out exactly why strcmp was failing to do so, but that's what I noticed when testing. This fixes it and adds a test for it.`

src/zarr.cpp Outdated
@@ -68,19 +70,16 @@ validate_props(const StorageProperties* props)
CHECK(tokens.size() > 2); // http://endpoint/bucket
} else {
const fs::path path = as_path(*props);
fs::path parent_path = path.parent_path().string();
LOG("path: '%s'", path.string().c_str());
Copy link
Member Author

Choose a reason for hiding this comment

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

Don't merge while this line is still here.

Copy link
Member

@nclack nclack left a comment

Choose a reason for hiding this comment

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

lgtm. don't forget about removing that log line before merging.

@aliddell aliddell merged commit c663594 into acquire-project:main Aug 21, 2024
3 checks passed
@aliddell aliddell deleted the idempotent-get-set branch August 21, 2024 17:57
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