make --rebalance of balanced use fullysizebalanced when useful

When the specified number of copies is > 1, and some repositories are
too full, it can be better to move content from them to other less full
repositories, in order to make space for new content.

annex.fullybalancedthreshhold is documented, but not implemented yet

This is not tested very well yet, and is known to sometimes take several
runs to stabalize.
This commit is contained in:
Joey Hess 2024-08-21 17:56:06 -04:00
parent 9e87061de2
commit 76ece2a699
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 70 additions and 28 deletions

View file

@ -318,6 +318,16 @@ elsewhere to allow removing it).
When the `--rebalance` option is used, `balanced` is the same as
`fullybalanced`.
When the specified number is greater than 1, and too many repositories
in the group are more than 90% full (as configured by
annex.fullybalancedthreshhold), this behaves like `fullysizebalanced`.
For example, `fullybalanced=foo:3`, when group foo has 5 repositories,
two 50% full and three 99% full, will make some content move from the
full repositories to the others. Moving content like that is expensive,
but it allows new files to continue to be stored on the specified number
of repositories.
* `sizebalanced=groupname:number`
Distributes content amoung repositories in the group, keeping

View file

@ -928,6 +928,12 @@ repository, using [[git-annex-config]]. See its man page for a list.)
The default reserve is 100 megabytes.
* `annex.fullybalancedthreshhold`
Configures the percent full a repository must be in order for
the "fullybalanced" preferred content expression to consider it
to be full. The default is 90.
* `annex.skipunknown`
Set to true to make commands like "git-annex get" silently skip over

View file

@ -30,6 +30,11 @@ Planned schedule of work:
## work notes
* Implement annex.fullybalancedthreshhold
* `git-annex assist --rebalance` of `balanced=foo:2`
sometimes needs several runs to stabalize.
* Bug:
git init foo