mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 02:57:37 +01:00
Ruling (B9 W3 bound): the dirty threshold, now the layer's BarrierBound, bounds how many chunks a cut copies under its barrier; it never triggers a cut. - While more candidates than the bound would be copied, the cut stages up to the bound per round outside the barrier: current bytes, compared to HEAD, uploaded under fresh content keys named by an intent written before the round's first upload. - Each staged chunk records its version: the chunk's highest write LSN, flushed or still in the WAL, taken before the read. Flushing never changes it; any later write raises it, so a stale stage is never used. - At the barrier a staged chunk stands for the copy only while its version and HEAD are unchanged; the rest is copied, so the image at H is exact. - At most three staging rounds; then the barrier copies the rest (correctness over pause), counts BarrierOverBound and reports the barrier copy size (BarrierCopyChunks). - Every intent of the cut (staging rounds and the barrier) is settled with it: deleted after the confirmed CAS or a clean abort, kept with an unresolved proposal. Superseded staged keys stay under their intent until then. - Snapshot, explicit Cut and Detach's final cut share the path. The barrier copy and staging share one readChunk helper. The provider passes ChunkDirtyThreshold (default 512) as the bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>