-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
fix: headobject will not save meta into cache when not found #19929
fix: headobject will not save meta into cache when not found #19929
Conversation
fix: headobject will not save meta into cache when not found
The main motivation here is that metadata on the cache is not useful, and it was a bit excessive in the current code. The caching will populate when both metadata and data are available such as GET and PUT. |
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
…he-when-not-found
I have recreated my cluster using KMS and caching enabled (also on the bucket), but I can't reproduce the issue anymore. It should be the same configuration as yesterday, so I'm not sure what has changed. Because I cannot reproduce the issue with an older Minio release, I cannot confirm that this release will fix it. |
I have posted my steps. You can follow them @ramondeklein |
@harshavardhana Shouldn't cache just be completely removed from HeadObject? It seems counterproductive to fetch up to a 1MB data (or whatever the limit is) just to serve Metadata header. |
HEAD is cached to save on reading xl.meta for metadata such as if-match, if-modified calls. However what was wrong was HEAD updating the cache without data.
This needs fix at mincache not at MinIO. |
@harshavardhana So HEAD is saved in a separate cache from GET requests? Just wondering if it returns data as well, or is everything split on the server. |
I have been able to reproduce the issue with this PR, so it doesn't seem to be fixed. When I restart the pods using this image it all seems to work fine:
When I copy the data to the
After a restart of the pods, everything works again. I can copy the files multiple times to my local disk without any issues. Only when I copy the files from my local disk to the bucket again, then it starts to fail. I double-checked, but I build my Docker image using branch |
I think there might be a problem that
@harshavardhana I guess my test indicates the same. |
Steps to reproduce:
After restarting |
This PR is an independent fix where it avoids discrepancy on HEAD, so not really fixing the original issue. |
fix: headobject will not save meta into cache when not found
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.
Description
fix: headobject will not save meta into cache when not found
Motivation and Context
How to test this PR?
Types of changes
HEAD
request returns differentContent-Length
then matchingGET
on a KMS setup #19925Checklist:
commit-id
orPR #
here)