From: Joey Hess Date: Tue, 13 Aug 2024 17:32:11 +0000 (-0400) Subject: fixed --rebalance stability on drop X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~21^2~132 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=10d8b3cc63abe804bed5c2dfc572ffcb78cac382;p=git-annex.git fixed --rebalance stability on drop Was checking the wrong uuid, oops --- diff --git a/Limit.hs b/Limit.hs index 81e0d91f47..3e0bd80654 100644 --- a/Limit.hs +++ b/Limit.hs @@ -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 diff --git a/doc/todo/git-annex_proxies.mdwn b/doc/todo/git-annex_proxies.mdwn index 1b9607c713..00b7c4030b 100644 --- a/doc/todo/git-annex_proxies.mdwn +++ b/doc/todo/git-annex_proxies.mdwn @@ -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.