* filer: refuse a forwarded conditional write on a non-owner
A filer applied any routed write a ring peer forwarded, even when its
own ring named another filer as the write owner. While two filers'
rings disagree (a cooling-off window closing at different times, or a
filer that installed the ring without the prior snapshot), each could
apply a conditional write of the same entry under its own path lock,
and both callers saw success.
The receiver now refuses such a forward with Unavailable carrying a
NOT_WRITE_OWNER reason, so the sender can tell nothing was applied.
Refusing rather than re-forwarding keeps the one-hop bound.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: re-route a forward the owner refused as not its own
A refused forward applied nothing, and the two rings converge once a
ring update reaches the lagging filer or a cooling-off window closes.
The sender now routes the write again by its own ring, with backoff,
until shortly after its latest window ends, and surfaces the refusal
only after that. A write whose owner turns out to be this filer is
applied locally.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: test forwarded conditional updates between two filers
Two filers on one store, each serving gRPC with its own ring: while
the receiver's ring names the sender as the owner, the forward is
refused and the entry is untouched; once the receiver's cooling-off
window closes, the sender's retried forward applies once and a second
update with the same expectation fails its condition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: keep retrying a refused forward through a new ring change
The retry deadline was taken from the cooling-off window seen at the
first refusal. A ring change arriving during the retries opens a new
window, in which the two rings can still disagree, so the deadline is
now recomputed after every refusal, capped at 15 s from the first one
so a ring that keeps changing cannot hold a request indefinitely.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* filer: surface a refused forward rather than apply it locally
A caller can check the entry before routing: an HTTP append verifies
its snapshot under its locks and then commits locally without a
condition. Once a forward is refused, the retries wait, and if this
filer's ring then names itself, a local apply would act on that stale
check and could overwrite an entry replaced meanwhile. The refusal now
surfaces in that case, and the caller retries the whole request.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>