Files
seaweedfs/weed/shell
Chris LuandGitHub 4b12af036c shell: add a reusable target picker for volume moves (#10579)
* shell: add a reusable target picker for volume moves

Picks the emptiest node near the source: locality first (same rack, then same
data center), emptiest within a tier. Free bytes decide where the cluster
reports them, free slots break the tie.

The pick is spent in the passed topology, so planning several moves from one
snapshot spreads them instead of stacking every one on whichever node started
emptiest.

Claude-Session: https://claude.ai/code/session_01Ks16jnt4S7gdDk8cheQ3xu

* shell: order targets on one metric, and reserve the real volume size

Comparing some pairs on free bytes and others on free slots is intransitive, so
the winner depended on sort order. One node too old to report filesystem bytes
now puts every candidate on slots.

Reserving the tier average let a batch of large volumes overcommit a
destination; callers pass what the move actually consumes.

Claude-Session: https://claude.ai/code/session_01Ks16jnt4S7gdDk8cheQ3xu
2026-08-05 00:07:39 -07:00
..
2026-06-19 09:09:01 -07:00
2024-09-29 10:38:22 -07:00
2024-09-29 10:38:22 -07:00