An epoch is removed only when a complete ownership census proves it. The fence
goes up on every shard first, so a writer on an older topology generation can no
longer create a row that only a discarded epoch would find. Then every named
table on every shard is read in keyset pages, and each row is attributed to the
newest epoch whose owner is the shard it sits on. A row pinned by a placement
exception that has a mapping to its shard depends on no epoch. The census runs
twice, and the pruned manifest is published with a compare-and-swap only when
both passes agree. The newest epoch is never removed. A zero-move
rebalance is not proof and is not accepted in its place.
The fence covers builder writes (insertInto, upsert and the
helpers on them). Raw SQL issued outside CollegeDB, and raw run() statements,
bypass it; stop those writers before pruning.
Drops the placement epochs no row depends on.
An epoch is removed only when a complete ownership census proves it. The fence goes up on every shard first, so a writer on an older topology generation can no longer create a row that only a discarded epoch would find. Then every named table on every shard is read in keyset pages, and each row is attributed to the newest epoch whose owner is the shard it sits on. A row pinned by a placement exception that has a mapping to its shard depends on no epoch. The census runs twice, and the pruned manifest is published with a compare-and-swap only when both passes agree. The newest epoch is never removed. A zero-move rebalance is not proof and is not accepted in its place.
The fence covers builder writes (insertInto, upsert and the helpers on them). Raw SQL issued outside CollegeDB, and raw
run()statements, bypass it; stop those writers before pruning.