ObjectTransaction: filer-side forwarding via route_key (#9659)

A non-owner filer forwards the whole transaction to the ring owner of route_key, so the owner's per-path lock stays the single serialization point even when the caller's ring view is stale. is_moved bounds forwarding to one hop. The gateway stamps route_key on every routed builder via the shared objectRouteKey helper. Completes taking S3 object mutations off the distributed lock.
This commit is contained in:
Chris Lu
2026-05-24 14:21:06 -07:00
committed by GitHub
parent 25beb7ec48
commit 2a4923e7e8
11 changed files with 226 additions and 22 deletions
+5 -2
View File
@@ -342,8 +342,9 @@ message Recompute {
// ObjectTransactionRequest applies an ordered list of mutations atomically with
// respect to other writers of the same object, by holding the filer's per-path
// lock on lock_key for the whole transaction. The optional condition is checked
// first, against the entry at lock_key. Callers must route the object's writes
// to its owner filer for the lock to be authoritative.
// first, against condition_key when set, else lock_key. Callers set route_key to
// the object's stable owner ring key; a filer that is not the owner forwards the
// transaction one hop to the owner, so a stale ring view is tolerated.
message ObjectTransactionRequest {
string lock_key = 1; // object path to lock and to evaluate the condition against
WriteCondition condition = 2; // optional precondition, checked under the lock
@@ -351,6 +352,8 @@ message ObjectTransactionRequest {
bool is_from_other_cluster = 4;
repeated int32 signatures = 5;
string condition_key = 6;
string route_key = 7; // ring key identifying the owner filer; a non-owner forwards the whole transaction to it
bool is_moved = 8; // set on a forwarded transaction so the receiver applies it locally instead of forwarding again
}
message ObjectTransactionResponse {