fixed --rebalance stability on drop

Was checking the wrong uuid, oops
This commit is contained in:
Joey Hess 2024-08-13 13:32:11 -04:00
parent 5afbea25e7
commit 10d8b3cc63
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 1 additions and 5 deletions

View file

@ -603,7 +603,7 @@ limitFullyBalanced mu getgroupmap groupname = Right $ MatchFiles
let keysize = fromMaybe 0 (fromKey keySize key)
let hasspace u = case (M.lookup u maxsizes, M.lookup u sizemap) of
(Just (MaxSize maxsize), Just (RepoSize reposize)) ->
if maybe False (`S.member` notpresent) mu
if u `S.member` notpresent
then reposize <= maxsize
else reposize + keysize <= maxsize
_ -> True

View file

@ -51,10 +51,6 @@ Planned schedule of work:
* `git-annex info` can use maxsize to display how full repositories are
* --rebalance is not stable. It will drop a key that was just stored in a
repo. Seems that limitFullyBalanced needs to take AssumeNotPresent
into account to handle dropping correctly.
* Implement [[track_free_space_in_repos_via_git-annex_branch]]:
* Load Annex.reposizes from Database.RepoSizes on startup.