-
Notifications
You must be signed in to change notification settings - Fork 430
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
Metadata-prefetch (aka Recursive listing or ls -R during mount) #1930
Metadata-prefetch (aka Recursive listing or ls -R during mount) #1930
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1930 +/- ##
==========================================
- Coverage 61.25% 60.76% -0.50%
==========================================
Files 130 130
Lines 12350 12397 +47
==========================================
- Hits 7565 7533 -32
- Misses 4445 4526 +81
+ Partials 340 338 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
e4ab612
to
ceddacc
Compare
b65d7b7
to
9d528d5
Compare
Integration tests are currently running. I'll add result for that once they finish. |
Tests have passed. logs |
0567424
to
363c7c6
Compare
@kislaykishore As discussed offline, I have replaced config-file |
363c7c6
to
55cb967
Compare
8426c15
to
8b4fca4
Compare
.. to metadata-prefetch-on-mount
Change "synchronous" to "sync", and "asynchronous" to "async" for values for metadata-prefetch-on-mount everywhere.
Changes in all internal state variables/ constants etc. needed to fix the mount-flags log.
This creates a mini-race condition between the debug log for successful and that of starting the recursive listing of mountPoint when metadata-prefetch-on-mount has been set to "async", but it is immaterial to the end user.
0913570
to
a54ef3e
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 a couple of comments.
Removed redundant call to callRecursiveList from the parent process of the GCSFuse daemon.
@raj-prince I've addressed your comments. PTAL. |
Reuse isDynamicMount utility in mount.go
Description
Metadata-prefetch (aka Recursive listing or ls -R during mount)
Metadata-prefetch is equivalent to running
ls -R
on the mount-directory to prime/prefill/prefetch the
metadata caches (both type and stat).
This change adds support for mountconfig-flag
metadata-prefetch-on-mount
in config-file. The type of value passed is a string.
The supported values are: (a) disabled, (b) sync, (c)
async.
If not set, the value
disabled
is taken by default.If value
disabled
is set, then no difference from the existing behaviour.If value
sync
is set, then mount is blockeduntil the metadata prefetch is complete. In this mode, if
the metadata-prefetch fails, the mount itself fails.
If value is set to
async
, then mount is notblocked, but metadata prefetch is
initiated in a go-routine and will complete sometime
later. In this case, if the metadata-prefetch fails,
then an error is logged in the GCSFuse log-file.
Link to the issue in case of a bug fix.
NA
Testing details
metadata-prefetch-on-mount: disabled
or withmetadata-prefetch-on-mount
not set:metadata-prefetch-on-mount: sync
:metadata-prefetch-on-mount: async
:message="... Completed recursive metadata-prefetch of directory: \"blah/blah/blah\". Number of items discovered: 61"