implement balanced=groupname:lackingcopies
authorJoey Hess <joeyh@joeyh.name>
Mon, 12 May 2025 18:27:32 +0000 (14:27 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 12 May 2025 18:27:32 +0000 (14:27 -0400)
commit1435f6ff820e80588b8047063426b3420aeaccef
treeb2e91cb9b3a055546729d47dff612971d2d09d86
parenta9eca1b568285ec8c88ac1405f344ab0f7cc263a
implement balanced=groupname:lackingcopies

Preferred content now supports "balanced=groupname:lackingcopies" to make
files be evenly balanced amoung as many repositories as are needed to
satisfy numcopies.

This implementation could be optimised to only call limitCheckNumCopies
once per file. Currently, it is called in two different places. Or it may
be that it would be better to add a cache to getNumMinCopiesAttr.

It might also be worth implementing :approxlackingcopies, but I'm not sure
if that has a use case. The use case for this seems to be when different
files have different numcopies values.

Sponsored-by: Brock Spratlen
CHANGELOG
Limit.hs
doc/git-annex-preferred-content.mdwn
doc/todo/balanced_preferred_content_taking_numcopies_into_account.mdwn [new file with mode: 0644]