Files
rustfs/crates/ecstore/src/layout
Zhengchao An 48c8d85f3b fix(ecstore): don't exclude pool when has_space_for is indeterminate (#5497) (#5682)
fix(ecstore): don't exclude pool when has_space_for is indeterminate

When `has_space_for` returns an error (not enough online disks to
reliably determine space), the old code treated this the same as
"definitely no space" via `unwrap_or_default()`, zeroing out the
pool's available capacity.  During pool decommission this creates a
false "Disk full" (500) for S3 PUT requests:

- Pool 0 (decommissioning) is correctly suspended → available = 0
- Pool 1 (active) has some disks whose disk_info call fails under
  heavy migration I/O → has_space_for returns Err → available forced
  to 0
- get_available_pool_idx sees total = 0 → returns None → DiskFull

Fix: distinguish Ok(false) (genuinely full) from Err (indeterminate).
On Err, log a warning and fall through to compute available space from
whatever disks did respond.  The actual write will enforce its own
quorum; a premature zero at the pool-selection layer is a false
rejection.

Closes #5497
2026-08-04 08:50:13 +08:00
..