s3: route non-conditional suspended DELETE off the DLM

A suspended DELETE removes the null version (the main object entry) and adds a
delete marker. Now that suspended PUT routes on the object key, a DELETE left on
the distributed lock wouldn't serialize against it (the per-path entry lock and
the distributed lock are independent). Route it on the object key too.

FinalizeVersionedWrite gains an optional delete_path it removes under the same
lock before flipping the pointer, so "delete null + add marker" is one atomic
step on the owner. createDeleteMarker threads it through (empty for the
versioning-enabled marker path). The DeleteObjectHandler routes a no-versionId
suspended delete when there is no If-Match — that condition targets the main
object, not the .versions pointer the op evaluates, so a conditional suspended
delete stays on the lock path. Object-lock can't apply (it requires versioning
enabled, never suspended).
This commit is contained in:
Chris Lu
2026-05-23 10:17:45 -07:00
parent d7854ce88e
commit 2d41f4ca8b
9 changed files with 56 additions and 12 deletions
@@ -292,6 +292,7 @@ message UpdateEntryResponse {
// from set_extended[prior_latest_key].
message FinalizeVersionedWriteRequest {
string lock_key = 13; // object path; the per-path lock all of this object's writes share
string delete_path = 14; // optional entry to delete under the lock first (suspended delete: the null version)
string versions_dir = 1; // full path of <object>/.versions
map<string, bytes> set_extended = 3; // merge into the .versions directory entry
repeated string delete_extended = 4; // remove from the .versions directory entry