mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-22 10:33:25 +00:00
4e7a8fabb8
The legacy bucket metadata migration writes the `.bucket-incarnation` sidecar before `.metadata.bin`. A crash or a lost namespace lease between the two writes left the bucket with a sidecar and no metadata, and every later load failed closed with "bucket incarnation sidecar exists without bucket metadata", so the bucket answered 500 to every request on every node with no repair path (rustfs/rustfs#8003). Load the sidecar-only state as a legacy bucket so the migration runs again. The migration and the force-create path re-read the sidecar under the transaction lock and keep its incarnation when persisting the metadata, so the retry never replaces an identity other nodes fenced on. A retired incarnation is never adopted: it is residue of a deleted bucket, and re-publishing it would let heal reclaim the new objects.