From 10d8b3cc63abe804bed5c2dfc572ffcb78cac382 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 13 Aug 2024 13:32:11 -0400 Subject: [PATCH] fixed --rebalance stability on drop Was checking the wrong uuid, oops --- Limit.hs | 2 +- doc/todo/git-annex_proxies.mdwn | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) 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. -- 2.30.2