1.8 KiB
Volume directory collisions
A directory uses the volume name and the first eight hexadecimal digits of its full layout identity. Two different full identities can select the same directory. The exclusive VOLUME create refuses that collision without writing VOLUME, HEAD, objects or payloads in the existing volume.
stateDiagram-v2
pending --> pending: ordinary storage error; retry same identity
pending --> replacementPending: exclusive create proves a valid foreign id8 collision
replacementPending --> pending: persist fresh full identity, retry in fresh directory
pending --> ready: matching VOLUME and HEAD created
ready --> ready: identical create replay
Only an ordinary, not-ready, unattached lifecycle record can redraw. A restore keeps its source/request binding and is not handled by this transition. A corrupt VOLUME, an unrelated identity mismatch, or an unknown store outcome never proves a collision. Ordinary reads and attach still reject every full-ID mismatch.
One RPC performs at most one redraw. It returns a retry response after recording the replacement; the next RPC creates the new directory. A replacement first lands through the lifecycle store's file-sync, rename and directory-sync path. If its synchronization result is unknown, a retry settles that on-disk identity before publishing it, rather than generating another. No ready identity changes.
The master serializes create and placement under workspaceMu. This is a change to pending creation only, not an assignment, lease, epoch or serving decision. MasterCreate3 checks the collision transition and OneIdentity (MUST-VIOLATE rows 220-224): redraw without proof, use before persistence and remint on replay each violate the invariant. Linux focused regression controls pass; the full master package's qualification remains open.