-
Notifications
You must be signed in to change notification settings - Fork 171
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
Allow --metadata-ttl without --cache and set default with --cache to 60s #855
Conversation
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.
Looks good!
Before merging:
- Add changelog entry
- Update CONFIGURATION.md https://github.com/awslabs/mountpoint-s3/blob/main/doc/CONFIGURATION.md#caching-configuration
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.
Just some minor stuff
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.
One minor suggestion, and then needs a rebase.
Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
a49cd60
to
edc662b
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.
LGTM, just one changelog thing.
mountpoint-s3/CHANGELOG.md
Outdated
### Breaking changes | ||
* No breaking changes. | ||
* When using the `--cache` flag, the default metadata time-to-live (TTL) is now set to 60 seconds instead of 1 second. The `--metadata-ttl` flag can still be set to further configure it, but can now also be used without the `--cache` flag in order to only enable caching of metadata. In addition to values in seconds, `--metadata-ttl` can now also be set to `minimal` (strict consistency) or `indefinite` (no updates). The `--metadata-ttl 0` setting is no longer supported, is now interpreted as `minimal`, and will be removed in a future release. ([#855](https://github.com/awslabs/mountpoint-s3/pull/855)) |
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.
Maybe split this up because only part of it is breaking
New features
- Metadata caching can now be configured independently of data caching. When passing the
--metadata-ttl <seconds>
argument without also specifying--cache <directory>
, Mountpoint will cache file metadata in memory for up to the given TTL, but will not cache object data. The--metadata-ttl
argument also accepts two special values:minimal
to enable only the minimal necessary caching, andindefinite
to cache indefinitely. These modes can help accelerate workloads that touch many files but do not need to cache object data for re-use (for example, listing a directory and then reading each file within it once).
Breaking changes
- The
--metadata-ttl 0
setting is no longer supported and will be removed in a future release. The new--metadata-ttl minimal
has a similar effect, but behaves better when latency for S3 requests is high.
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've also added a breaking change entry for the new default TTL with cache.
Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
Description of change
Allow users to explicitly enable metadata caching, independently of object content caching, by setting the
--metadata-ttl
option. Before this change, users were required to also set--cache <DIR>
in order to configure the metadata TTL. To enable just the metadata cache they had to resort to the workaround of restricting the cache size to zero (--max-cache-size 0
).We are also introducing the following special values for
--metadata-ttl
:minimal
: describe the default setting (when--cache
is not used) where Mountpoint caches metadata for up to 1s, refreshes it onopen
, and does not keep a negative cache.indefinite
: new value recommended for users with static buckets, disables refreshing of metadata. (Implemented by setting the TTL to the maximum allowed value, ~100 years).When
--cache
is set, we are now also setting the default TTL for metadata to60s
(1min
) vs the previous1s
.Finally, setting
--metadata-ttl 0
now resolves tominimal
and logs a warning to notify users.The caching options section looks like this:
Relevant issues: #752, #759, #768
Does this change impact existing behavior?
Two changes to existing behavior:
--cache
but not--metadata-ttl
, the default TTL is60s
vs the previous1s
.--metadata-ttl 0
resolves tominimal
and logs a warning.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).