[s3] Avoid ListBucket requirement in snapshot commit path#8263
Conversation
|
I think this still breaks commit conflict handling on object stores. The latest snapshot is read before acquiring the commit lock, and |
|
Thanks for catching this.The previous object-store branch could skip the stale snapshot guard and overwrite an existing I updated the PR to keep the no-overwrite conflict signal without requiring
Added regression tests for the stale commit conflict path and S3 412 handling. Verified with focused Maven tests, and with Ceph RGW using a temporary user without |
Purpose
Fixes #8261.
Avoid requiring
ListBucketfor S3-compatible object-store snapshot commits, while preserving the stale snapshot conflict handling.The change skips the
exists(snapshot-N)probe on object stores, but writessnapshot-Nwith no-overwrite semantics. For S3 this usesIf-None-Match: *, and maps412 PreconditionFailedtoFileAlreadyExistsException, so stale commits retry instead of overwriting existing snapshot metadata.Non-object-store behavior is unchanged.
Tests
Added regression tests for:
exists(snapshot-N)snapshot-N412 PreconditionFailedis treated as the file-exists conflict signalVerified with:
Also verified against Ceph RGW with a temporary user without
ListBucket: first conditional PUT succeeds, second returns 412, and the original object