pingqiuandClaude Opus 5.5 fe0cd8448c Start the new holder's lease when a workspace move is issued
A move issue cleared the lease and the new holder's lease was created
only by its first renewal. A holder that died between its grant and its
first renewal left the volume with no lease, so no move was ever
admitted again, not even a forced one. A holder that died after renewing
but before claiming HEAD was stuck too: HEAD still named its predecessor
and the forced move refused it.

The issue write now starts the new holder's lease (horizon issue +
1.5*TTL, granted deadline issue + TTL, the same values a first grant
uses), so an unclaimed grant expires like any other lease and a forced
move is admitted after that lease's expiry plus the skew bound, never on
a predecessor's lease. The holder's first renewal is an ordinary renewal
of that lease, with no extra write.

A forced move also accepts a HEAD that still names the predecessor when
it is unchanged since the move to the expected holder was issued (same
generation and remote LSN, older epoch). Clean moves are unchanged.
Blockmaster reads HEAD for a forced move only after its lease admission
holds, so the HEAD the move and its lost range rest on can no longer be
changed by the expired holder. A holder resuming after the forced move
is refused at attach by its lease-gated projection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 04:10:03 -08:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%