mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
ea0b8955dcae83cfe34ff2fb4065000031ef998a
Past the 64 MiB in-memory budget a copy window spills saved chunks to a sparse side file next to the volume, with no byte limit: under a long copy and steady writes it could fill the filesystem under the WAL/extent. New chunkLayerConfig.COWSpillLimit (bytes; 0 defaults to 1 GiB, negative refused at attach). A save that would take the side file past it aborts the window (errCutCOWAborted, the caller retries the cut) instead of writing; the guest write still completes. Tests: a save past the cap aborts the cut, the write completes and no side file is written; a spill within the cap is accounted (one chunk) and the cut completes; the default applies and a negative cap is refused. Four declared mutants (no cap, no accounting, no default, negative accepted) each turn exactly their declared tests red. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Languages
Go
84.5%
Rust
7.9%
Shell
2.7%
templ
1.6%
Java
1%
Other
2%