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: do not return an error for successfully deleted dangling objects #10938
Conversation
f89b080
to
fba53fc
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.
Some comments
fba53fc
to
773e32a
Compare
45987db
to
77fe7db
Compare
dangling objects when removed `mc admin heal -r` or crawler auto heal would incorrectly return error - this can interfere with usage calculation as the entry size for this would be returned as `0`, instead upon success use the resultant object size to calculate the final size for the object and avoid reporting this in the log messages Also do not set ObjectSize in healResultItem to be '-1' this has an effect on crawler metrics calculating 1 byte less for objects which seem to be missing their `xl.meta`
77fe7db
to
6cf9e5a
Compare
Mint Automation
10938-6cf9e5a/mint-gateway-azure.sh.log:
Deleting image on docker hub |
PTAL @klauspost @vadmeste |
@harshavardhana It seems reasonable, but the existing crawler code relies on an error being returned when the object doesn't exist. Otherwise the directory will remain 'alive', at least for another cycle. The changes in #10876 should however make this a non-issue, since it handles dangling stuff by itself. |
I am making these changes for But this change is needed. |
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
…minio#10938) dangling objects when removed `mc admin heal -r` or crawler auto heal would incorrectly return error - this can interfere with usage calculation as the entry size for this would be returned as `0`, instead upon success use the resultant object size to calculate the final size for the object and avoid reporting this in the log messages Also do not set ObjectSize in healResultItem to be '-1' this has an effect on crawler metrics calculating 1 byte less for objects which seem to be missing their `xl.meta`
Description
fix: do not return an error for successfully deleted dangling objects
Motivation and Context
dangling objects when removed
mc admin heal -r
or crawlerauto-heal would incorrectly return error - this can interfere
with usage calculation as the entry size for this would be
returned as
0
, instead of upon success use the resultantobject size to calculate the final size for the object
and avoid reporting this in the log messages
Also do not set ObjectSize in healResultItem to be '-1'
this has an effect on crawler metrics calculating 1 byte
less for objects which seem to be missing their
xl.meta
How to test this PR?
Manually creating dangling objects
Types of changes
Checklist:
commit-id
orPR #
here)