Repository navigation
Conversation
|
Self-review update: HOLD. I reproduced an omitted ordering with separate OLD and NEW Python processes using the
At step 3 OLD reads no A subsequent real NEW reap also confirms the write-path blocker:
Making |
|
Independent verification, run against current I drove your OLD/NEW lifecycle as separate processes against separate checkouts — OLD Your HOLD is right, and it reproduces identically on both sidesThe ordering from your self-review, step for step:
Byte-identical. The acceptance happens in a process that never reads a shard, so nothing on The second decrease you reported also reproduces exactly: after that OLD recreate, a real NEW The issue-body ordering, though, this diff does fixSame probe, the ordering in #652:
So the whole-entry precedence really does drop a live generation and hand out a sequence a Two things the diff changes that I don't think you intended1.
2. The read path now consults both files unconditionally. The generator I have not filed anything against #652 myself — one issue, one PR, and this is yours. Posting |
|
Thanks @alisemut0711-dev for independently reproducing both orderings and for confirming both the real improvement and the remaining OLD-recreate blocker. Good catches on the dropped |
|
The design boundary this is holding for is already asserted in the code, which makes the open question narrower than it looks.
That branch has no other purpose. The whole-entry flat precedence you and @alisemut0711-dev measured regressing the floor is not an unconsidered scenario — it is the deliberate handling of exactly the window #652 exercises, written to prevent the very regression it now causes when both sides write between passes. The So "an explicit non-rolling migration boundary" would not be settling something undefined. It would retire a guarantee The window is also wider than a startup step, which I have not seen stated here. The split does not run at boot. It rides
Your ordering — OLD reaps, NEW splits, OLD recreates — is therefore not a narrow interleaving. Each step is a separate throttled pass with minutes of room between them, which is consistent with how cleanly it reproduces on both sides. I am not proposing a fix on top of your HOLD; you are right that a partial one makes this worse, and the two reproductions already establish the behaviour. This is only to point at the smaller question underneath: honour the rolling-upgrade guarantee |
|
Triage: closing as a duplicate of #708. Both PRs fix #652 with the same insight: during a rolling upgrade an old worker can update the legacy seq map while a new worker updates the shard, and the two updates need not be the same transition — one may advance Keeping #708: this PR is still a draft, and #708 is a finished, non-draft change of the same shape that merges cleanly against Credit to @almondous for filing #652 and reaching the fix first — per CONTRIBUTING's "Overlapping work", the useful next step is to review #708 rather than finish a parallel branch. Reopen if you would rather carry this one and a maintainer agrees; the two differ mainly in whether the merge helper takes varargs entries or one entry at a time. Generated by Claude Code |
What
This draft investigates #652. Its current commit reconciles legacy flat and sharded
sequence state by taking independent maximum floor and generation values.
Why
That rule fixes the originally reported ordering where OLD reaps and NEW recreates
before a recovery split. It is not sufficient for the inverse ordering: after NEW
retires the flat map, OLD can recreate an absent room before another flat map exists.
OLD then accepts sequence 1 and generation 1 despite a retained shard floor of 2 and
generation 1. Reconciliation happens after the collision and cannot undo it.
A correct rolling migration needs a compatibility phase that keeps authoritative
legacy state available to OLD and dual-writes NEW lifecycle updates, followed by an
explicit cutover after OLD workers drain (or an explicit non-rolling migration
boundary). I am keeping this PR in draft while that design boundary is resolved.
Verified with separate OLD and NEW processes against one disposable filesystem:
487caca186a3da60597bffe29dac69ac0802a4cac0455ff53ffe468dd814525c8aa9e8ad236f1c79eebdaddc3f11adf3f2c5096e31ce4727c86a0382