-
Notifications
You must be signed in to change notification settings - Fork 429
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
Large directory listing returns wrong results with --enable-storage-client-library=true #1054
Comments
Hey @MattIrv , We tried listing more than 54979 (60000) files in a directory mounted through GCSFuse and that worked with both Could you please share the following information to debug further ?
|
It consistently reproduces on the same buckets, but with different numbers of files it might not. I would recommend you try to test with a bucket that has exactly 54979 files and see if that causes it to reproduce. I've also seen different behavior depending on whether the files are in a folder in the bucket or just in the bucket root (although I've been able to reproduce it in both cases I think) so I would recommend trying with them just in the bucket root
Flat files. Maybe there's one directory in there.
I believe I tried this and didn't see any change. I'll double check the next time I see it happen as well |
Confirmed this repros even with
When I run with
|
Repro steps:
Mount using gcsfuse and list:
Check the number of files, it's correct:
Create a single implicit directory:
Now list again, it's incorrect:
Remove the file, the listing is correct again:
Add a single file in the root directory, the listing is still correct:
|
Thank you @MattIrv for sharing repro steps. We were able to reproduce the issue. We will fix this issue in our upcoming GCSFuse release (i.e. v0.42.4). |
@MattIrv , Thanks for your patience. The fix for this issue has been released in GCSFuse v0.42.4. Closing this issue. Please re-open if you face any further issues. |
Describe the bug
Please provide a clear description of what you were trying to achieve along with the details of the flags that you passed.
I'm listing a bucket that has a lot of files in it. It returns incorrect results. When I try it with
--enable-storage-client-library=false
I get the right results.Using gcsfuse:
To Collect more Debug logs
Steps to reproduce the behavior:
System (please complete the following information):
Additional context
Add any other context about the problem here.
I get the correct results when running with --enable-storage-client-library=true:
I can't quite tell what the bug is, but I think it may be coming from the implementation of ListObjects in https://github.com/GoogleCloudPlatform/gcsfuse/blob/master/internal/storage/bucket_handle.go#L238 and how it handles the PageToken, in particular it seems to assume that an API call would be made and the PageToken would be updated on every call to Next() which I don't think is true.
The text was updated successfully, but these errors were encountered: