-
Notifications
You must be signed in to change notification settings - Fork 423
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
Skip unsupported object names in list output #1876
base: master
Are you sure you want to change the base?
Conversation
3d1d4bf
to
dfcbf92
Compare
ed0d51d
to
9024dc6
Compare
9024dc6
to
c1195c4
Compare
02488f1
to
cca204a
Compare
Presubmit tests passed: logs |
80306c2
to
fbbc0b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to take a look at the tests
fbbc0b1
to
dc55c22
Compare
dc55c22
to
1d76261
Compare
4acab17
to
2a971eb
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1876 +/- ##
==========================================
+ Coverage 78.38% 78.39% +0.01%
==========================================
Files 107 108 +1
Lines 11793 11833 +40
==========================================
+ Hits 9244 9277 +33
- Misses 2058 2064 +6
- Partials 491 492 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
2b902ee
to
d655104
Compare
d655104
to
88666fb
Compare
827980a
to
cc6edfe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added self-review comments.
c5ced39
to
2fa79ce
Compare
@ashmeenkaur @sethiay I've resolved all your comments. Please review again. |
7348976
to
376c68e
Compare
internal/fs/implicit_dirs_test.go
Outdated
AssertEq(4, len(entries)) | ||
verifyFileInfo(entries[0], "4", false) | ||
verifyFileInfo(entries[1], "a", true) | ||
verifyFileInfo(entries[2], "bar", true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this expected? There is no valid object having "bar" directory. I think this will cause issues in case of RemoveDir operation as the object won't be listed during the operation. Please check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this expected? There is no valid object having "bar" directory.
Yes. This is the cost of using MaxResults=1 for lookUpInode.
If we have objects bar//1
, and bar/2
in a bucket, gcs list call during lookUpInode with MaxResults=1 will return bar//1
. If we reject unsupported object bar//1
at the time of lookup-inode, then bar
will never be identified as a directory by GCSFuse, and thus bar/2
will never be accessible through GCSFuse, which is no better than the current bug. Now, even if there is no object named bar/2
, we can not know from gcs list call with MaxResults=1, and we end up having to identify bar
as a directory, albeit empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will cause issues in case of RemoveDir operation as the object won't be listed during the operation
I'm not sure I understand what you mean by issues. Are you saying that bar//1
will not be deleted, or that it'll be deleted without being listed ?
I'll test out RemoveDir manually to see what the behaviour is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test out RemoveDir manually to see what the behaviour is.
I tested this out manually, in the above example, if I try and delete/rename bar
in the gcsfuse mount, it only deletes/renames bar/2
and has no impact on bar//1
in GCS . This looks like the correct behaviour to me as we intend to have bar//1
be invisible to a GCSFuse mount.
179725a
to
1d4da0e
Compare
This PR is causing a problem with |
c18507e
to
b867458
Compare
@@ -234,7 +234,7 @@ func (bm *bucketManager) SetUpBucket( | |||
} | |||
|
|||
// Periodically garbage collect temporary objects | |||
go garbageCollect(bm.gcCtx, bm.config.TmpObjectPrefix, sb) | |||
//go garbageCollect(bm.gcCtx, bm.config.TmpObjectPrefix, sb) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo this.
28c8bfe
to
00ff9c4
Compare
00ff9c4
to
5fb1408
Compare
5fb1408
to
8635cfb
Compare
Description
Skip unsupported directory names in list prefixes. Warn on unsupported object names returned on listing.
GCS supports objects of path-type
<bucket>/<path1>//<path2>
and treats it different from
<bucket>/<path1>/<path2>
, while they are both the same in linux filesystem.GCSFuse being a POSIX-compliant file-system only support the latters and throws error on former. This error can disallow the listing of all directories in the parent directory i.e.
<path1>
.The current change ignores the listing of prefixes (directory names) which are empty such
as "/" above to ignore the error and logs the above event as a warning.
This is followed up in
.
and..
and their derivative object names to the list of unsupported object names, And inLink to the issue in case of a bug fix.
NA
Testing details
<bucket>//hello.txt
, 2.<bucket>/a/hello.txt
gcsfuse --implicit-dirs --log-file=$logfile --debug_fuse --log-format=text $bucket $mountpath