From 3e6e0c9603c225b3bc77b3fdd50b01a8d4ab8ce7 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Wed, 18 Nov 2026 23:13:32 -0800 Subject: [PATCH] blockvolume: correct the --chunk-dirty-threshold help text and comment The flag help and the ChunkDirtyThreshold comment still described the cut as it was before copy-before-write: "bound on one cut's barrier copy" and "0 = unbounded". Since the chunk copy moved out of the barrier, the value is the number of candidate chunks above which a cut pre-copies (stages) chunks before its barrier, in rounds of that size, and 0 disables pre-copy (chunk_layer.go, stage: a bound <= 0 returns without staging). Text only. No behaviour change. Co-Authored-By: Claude Fable 5.2 --- seaweed-block/cmd/blockvolume/main.go | 2 +- seaweed-block/core/frontend/durable/provider.go | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/seaweed-block/cmd/blockvolume/main.go b/seaweed-block/cmd/blockvolume/main.go index 96935591bd..1b55ae9c5d 100644 --- a/seaweed-block/cmd/blockvolume/main.go +++ b/seaweed-block/cmd/blockvolume/main.go @@ -193,7 +193,7 @@ func parseFlags(args []string) (flags, error) { fs.StringVar(&f.chunk.replication, "chunk-replication", "", "walstore-chunk: replication for chunk needles (empty = filer default / storage rule)") fs.DurationVar(&f.chunk.captureInterval, "chunk-capture-interval", defaultChunkCaptureInterval, "walstore-chunk: automatic cut once this long has passed since the last successful cut; 0 (default) disables the timer, e.g. 15m as a host-loss safety net") fs.IntVar(&f.chunk.uploadConcurrency, "chunk-upload-concurrency", 8, "walstore-chunk: maximum concurrent dirty-chunk uploads (1..64)") - fs.IntVar(&f.chunk.dirtyThreshold, "chunk-dirty-threshold", defaultChunkDirtyThreshold, "walstore-chunk: bound on one cut's barrier copy, in chunks; never triggers a cut; 0 = unbounded") + fs.IntVar(&f.chunk.dirtyThreshold, "chunk-dirty-threshold", defaultChunkDirtyThreshold, "walstore-chunk: number of candidate chunks above which a cut pre-copies (stages) chunks before its barrier, in rounds of this size; copy-before-write copies the rest outside the barrier; never triggers a cut; 0 = no pre-copy") fs.BoolVar(&f.chunk.controlEndpoint, "chunk-control-endpoint", false, "walstore-chunk: expose the /chunk/* control routes (cut, snapshot, snapshots, snapshot/delete, detach) on the status HTTP listener; off by default; loopback-only like the listener") fs.UintVar(&f.durableBlocks, "durable-blocks", 2048, "number of blocks per volume on first create (ignored when opening existing)") fs.UintVar(&f.durableBlockSize, "durable-blocksize", 4096, "block size in bytes on first create") diff --git a/seaweed-block/core/frontend/durable/provider.go b/seaweed-block/core/frontend/durable/provider.go index 1b9f8e565f..8b3395f381 100644 --- a/seaweed-block/core/frontend/durable/provider.go +++ b/seaweed-block/core/frontend/durable/provider.go @@ -157,10 +157,12 @@ type ProviderConfig struct { // passed since the volume's last successful cut (of any kind). Zero // disables the timer. ChunkCaptureInterval time.Duration - // ChunkDirtyThreshold is the bound on one cut's barrier copy, in - // chunks. It never triggers a cut: the remote holds snapshots, and - // cuts are published only by CaptureVolume, MakeVolumeRemoteDurable - // (snapshot, detach) and the timer. Zero: unbounded. + // ChunkDirtyThreshold is the number of candidate chunks above which + // a cut pre-copies (stages) chunks before its barrier, in rounds of + // this size; copy-before-write copies the rest outside the barrier. + // It never triggers a cut: the remote holds snapshots, and cuts are + // published only by CaptureVolume, MakeVolumeRemoteDurable + // (snapshot, detach) and the timer. Zero: no pre-copy. ChunkDirtyThreshold int // ChunkUploadConcurrency bounds remote uploads; zero defaults to 8. ChunkUploadConcurrency int