From 586f7e442d73c038503be9fb714efe1b16f0a4bf Mon Sep 17 00:00:00 2001 From: pingqiu Date: Fri, 27 Nov 2026 18:36:43 -0800 Subject: [PATCH] fix: new volumes are at most 256 GiB in v1.0.0 MaxNewVolumeBytes is 256 GiB (65,536 chunks of 4 MiB), derived from the measured number of chunks a commit checks within one 2 s update of HEAD, halved and rounded down. The release note states the limit, why, that a restore target takes its source's size, and that it is planned to be removed in 1.0.1. Co-Authored-By: Claude Opus 5.5 --- seaweed-block/core/geometry/volume_size.go | 11 ++++++++--- seaweed-block/docs/releases/v1.0.0.md | 4 ++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/seaweed-block/core/geometry/volume_size.go b/seaweed-block/core/geometry/volume_size.go index 6263383459..9259c2afca 100644 --- a/seaweed-block/core/geometry/volume_size.go +++ b/seaweed-block/core/geometry/volume_size.go @@ -15,9 +15,14 @@ const MaxVolumeBytes uint64 = (16 << 40) - 4096 // and a cluster spec's volumes). It is checked only where a volume is // created, so a volume that already exists keeps opening under // MaxVolumeBytes. A restore target takes its source's size. -// Placeholder value: MaxVolumeBytes, until it is set from the measured -// capacity limit. -const MaxNewVolumeBytes uint64 = MaxVolumeBytes +// +// 256 GiB is 65,536 chunks of 4 MiB. A cut's commit checks the chunks it +// names within one 2 s conditional update of HEAD; the worst of five +// measured runs verified about 188,000 chunks in that time at 32 requests +// in flight. Halved for the rest of the update (the HEAD write, the +// manifest segments, a loaded or remote filer) and rounded down to a power +// of two, that is 65,536 chunks. +const MaxNewVolumeBytes uint64 = 256 << 30 // ErrVolumeTooLarge refuses a new volume above MaxNewVolumeBytes. var ErrVolumeTooLarge = errors.New("volume too large") diff --git a/seaweed-block/docs/releases/v1.0.0.md b/seaweed-block/docs/releases/v1.0.0.md index c4e300296b..8bdf3e93c4 100644 --- a/seaweed-block/docs/releases/v1.0.0.md +++ b/seaweed-block/docs/releases/v1.0.0.md @@ -64,6 +64,10 @@ defaults, so a pod whose holder does not come back holds I/O for about 600 s whe blockmaster reads volume HEADs through its SeaweedFS filer connection (`--chunk-filer`). ## Limits +- New volumes are at most 256 GiB (65,536 chunks of 4 MiB) in v1.0.0. A cut's commit checks the chunks it names + within one 2 s update of HEAD, and larger volumes were not measured to fit. CreateVolume refuses a larger size + (`InvalidArgument`, `volume too large`, naming the maximum), and blockmaster refuses to start with a `--cluster-spec` + volume above it. A restore target takes its source's size. The limit is planned to be removed in 1.0.1. - Up to 10 snapshots per volume; one more is refused with `snapshot_limit` and changes nothing (delete a snapshot or let retention prune). - A snapshot takes about 2 s per GiB changed since the last cut (64 GiB: 122 s). The CLI waits 60 s by default and