Files
seaweedfs/weed/shell
Yip LeoandClaude Opus 5.5 22abfe2d1b shell: leave emptier servers without free slots out of the -byDiskUsage ideal (#13247)
* shell: leave emptier servers without free slots out of the -byDiskUsage ideal

volume.balance -byDiskUsage never picks a server without a free volume
slot as a move target, but planBalance counted every server in the ideal
ratio. A server that is emptier than the rest but has no free slot, as
happens to an auto-sized disk (no -max) whose free space is held as
growth room for its partly written volumes, pulled the ideal below the
usage of the servers that could take a volume. Every target's next
ratio then exceeded the ideal, planBalanceMove stopped at the first one,
and the run planned no move while the fullest servers kept filling.

The ideal of a -byDiskUsage run now leaves those servers out: a server
without a free slot below the ideal is dropped and the ideal recomputed
over the rest, until none is below it. A server without a free slot
above the ideal still counts, as it is drained as a source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* shell: leave servers out of the -byDiskUsage ideal by their raw ratio

idealRatioOfReceivingServers compared a server with DensityRatio, which
gives a server with no whole volume used a floor of half a volume over
its capacity. A small disk without free slots then compared above the
ideal and stayed in it, holding the ideal under the targets' next ratio
as before. Compare the raw used/capacity ratio, the one the ideal is
made of.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 03:22:35 -08:00
..