Skip to content
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 DeleteObject API for unversioned objects with insufficient read q… #19581

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

poornas
Copy link
Contributor

@poornas poornas commented Apr 22, 2024

…uorum

Since the object is being permanently deleted, lack of read quorum should not matter as long as sufficient disks online to complete the delete with parity requirements.

If several pools have the same object with insufficient read quorum, attempt to delete object from all the pools where it exists

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

Motivation and Context

How to test this PR?

need to simulate drives offline/ inconsistent metadata for a multi pool setup

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

cmd/erasure-object.go Outdated Show resolved Hide resolved
cmd/erasure-object.go Outdated Show resolved Hide resolved
@poornas poornas force-pushed the unversioned-del branch 6 times, most recently from 5ce6611 to bc8a82e Compare April 24, 2024 20:36
…uorum

Since the object is being permanently deleted, lack of read quorum should not
matter as long as sufficient disks online to complete the delete with parity
requirements.

If several pools have the same object with insufficient read quorum, attempt to
delete object from all the pools where it exists
er.addPartial(bucket, object, opts.VersionID)

return objInfo, InsufficientWriteQuorum{}
if opts.Versioned || opts.VersionSuspended || countOnlineDisks(storageDisks) < len(storageDisks)/2+1 {
Copy link
Member

@krisis krisis Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to handle this without the tryDel boolean. It looks like the current code implicitly assumes that an error other than InsufficientReadQuorum is VersionNotFound, as evidenced by if opts.DeleteMarker { versionFound = false .... If we make the error handling for getObjectInfoAndQuorum more robust, we can avoid this boolean flag to alter control flow. If you feel that this change is out of scope to what you wish to accomplish in this change, that is fine too. We can address that subsequently.

@harshavardhana harshavardhana merged commit e7aa26d into minio:master Apr 26, 2024
20 checks passed
@harshavardhana harshavardhana deleted the unversioned-del branch April 26, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants