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 <noreply@anthropic.com>
This commit is contained in:
pingqiuandClaude Opus 5.5 committed 2026-11-27 18:36:43 -08:00
1 parent 57cfe0827f
commit 586f7e442d
2 files changed
+12 -3

No files matched your search

+8 -3
View File
@@ -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")
+4
View File
@@ -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