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

Inconsistent Behaviour Listing File #3712

Closed
tustvold opened this issue Feb 13, 2023 · 2 comments
Closed

Inconsistent Behaviour Listing File #3712

tustvold opened this issue Feb 13, 2023 · 2 comments
Labels
bug object-store Object Store Interface

Comments

@tustvold
Copy link
Contributor

tustvold commented Feb 13, 2023

Describe the bug

Calling list with a path to an existing file behaves inconsistently

  • LocalFileSystem, GCP, AWS, Azure return an empty list
  • MemoryStore and HttpStore return the file at the given path

To Reproduce

Add the below to the put_get_delete_list_opts test

let content_list = flatten_list_stream(storage, Some(&location)).await.unwrap();
assert_eq!(content_list, &[]);

Expected behavior

The docs state

Prefixes are evaluated on a path segment basis

As such all stores should return an empty list

Additional context

@roeap
Copy link
Contributor

roeap commented Feb 13, 2023

It seems azure Gen2 accounts also have the bug.

I'd be happy to take this up. Just a quick question as to how. I would have gone the naive way and just filter results for the affected stores, since I assume we cannot do much about the returns we are getting from the backend.

Do you see another way?

@tustvold
Copy link
Contributor Author

It seems azure Gen2 accounts also have the bug.

Sigh... I don't understand why Azure thought directories in object storage were a good idea...

I'd be happy to take this up

I'm actually most of the way through a fix for HTTP and MemoryStore, I'll finish this up and then perhaps you could pick up the azure shenanigans?

tustvold added a commit that referenced this issue Feb 13, 2023
#3713)

* Filter exact list prefix matches for MemoryStore and HttpStore (#3712)

* Update object_store/src/lib.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug object-store Object Store Interface
Projects
None yet
Development

No branches or pull requests

2 participants