Repository navigation
fix(pools): keep rejected names out of a single-pool bulk delete - #333
Merged
Merged
Conversation
DeleteObjects checks every name with checkDelObjArgs, but a single pool still sent all entries to the drives and cleared the error of an entry that a drive reported as found. Local drives join the name to the bucket directory, so a name with a ".." segment reached another bucket or the meta bucket. An S3 DeleteObjects caller allowed to delete in one bucket could remove a version elsewhere, including one under Object Lock retention, and from a versioned bucket could write a delete marker on an object of another bucket or on stored bucket metadata. The bulk lock was taken on the normalized name as well, that is on the other object. Entries that fail the check now keep their error, and the rest of the request runs as a request of its own, before any lock or lookup. A request whose names are all valid does not enter the new code. More than one pool already skipped such entries. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Feng Ruohang <rh@vonng.com>
Vonng
enabled auto-merge
November 10, 2026 06:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Present since the bulk delete was introduced upstream; reproduced on
RELEASE.2026-11-09T00-00-00ZandRELEASE.2026-10-26T00-00-00Z. Deployments with more than one pool are not affected.erasureServerPools.DeleteObjectschecks every name withcheckDelObjArgs, but on a single pool it still sent all entries to the drives, and it cleared the error of an entry that a drive reported as found. The names of an S3DeleteObjectsrequest come from the XML body, which the path checks of the request URL do not see, and a local drive joins the name to the bucket directory. A name with a..segment therefore reached another bucket or the meta bucket:s3:DeleteObjectalone, the request wrote a delete marker on an object of another bucket or on stored system metadata such as a bucket's.metadata.bin;In a distributed single pool the remote drives refuse such a path (
guardedStorage), the local drives of the node that took the request did not.Change
Right after the check, entries that failed it keep their error and the rest of the request runs as a request of its own, before any lock, lookup or drive call. A request whose names are all valid does not enter the new code. The check is the one a single-object DELETE applies.
Behavior: on a single pool an entry whose name fails the check now returns
XMinioInvalidObjectNamefor that entry instead of being reported as deleted, as it already did with more than one pool. The other entries of the request are deleted as before.Tests
TestPoolsBulkDeleteInvalidNames: object layer, on the one bulk lock of a single node, on a pool that locks per set, and on two pools. Fails on the first two without the fix.TestBulkDeleteObjectLockNameOutsideBucket: S3 request of a user who may delete in one bucket only; a version under COMPLIANCE retention, the object and the stored bucket metadata of another bucket stay. Fails without the fix.Both names match existing race steps in
go.yml, and the second one the Object Lock gate inrelease.yml.🤖 Generated with Claude Code