s3, gs, azure: re-enable prefix-based search optimization#6151
Merged
Conversation
isidentical
commented
Jun 10, 2021
Contributor
Author
There was a problem hiding this comment.
It might be a nice idea (for future refactors of remotes) to pass the prefix in here (0/), and use the actual path (bucket/cache/00/) as the path_info (to be fully fsspec-compliant).
Contributor
There was a problem hiding this comment.
Yeah, it would make more sense for us to do
walk("bucket/00/", prefix="0")
instead of the current
walk("bucket/00/0", prefix=True)
isidentical
commented
Jun 10, 2021
Contributor
Author
There was a problem hiding this comment.
I don't really know if there is a scenario where the prefix will not be None for this case (TRAVERSE_PREFIX_LEN=2, used by filesystems with real dirs etc) but if there is no such case, then perhaps we could add an assert prefix is None as a safe-guard.
3e60cfd to
47e3498
Compare
pmrowla
approved these changes
Jun 11, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It was turned off due to not all providers supporting
find(<something>, prefix=<something>)but now it is safe to turn that back on. Resolves #6089.