git-annex/Remote
Joey Hess 780367200b
remove dead nodes when loading the cluster log
This is to avoid inserting a cluster uuid into the location log when
only dead nodes in the cluster contain the content of a key.

One reason why this is necessary is Remote.keyLocations, which excludes
dead repositories from the list. But there are probably many more.

Implementing this was challenging, because Logs.Location importing
Logs.Cluster which imports Logs.Trust which imports Remote.List resulted
in an import cycle through several other modules.

Resorted to making Logs.Location not import Logs.Cluster, and instead
it assumes that Annex.clusters gets populated when necessary before it's
called.

That's done in Annex.Startup, which is run by the git-annex command
(but not other commands) at early startup in initialized repos. Or,
is run after initialization.

Note that is Remote.Git, it is unable to import Annex.Startup, because
Remote.Git importing Logs.Cluster leads the the same import cycle.
So ensureInitialized is not passed annexStartup in there.

Other commands, like git-annex-shell currently don't run annexStartup
either.

So there are cases where Logs.Location will not see clusters. So it won't add
any cluster UUIDs when loading the log. That's ok, the only reason to do
that is to make display of where objects are located include clusters,
and to make commands like git-annex get --from treat keys as being located
in a cluster. git-annex-shell certainly does not do anything like that,
and I'm pretty sure Remote.Git (and callers to Remote.Git.onLocalRepo)
don't either.
2024-06-16 14:39:44 -04:00
..
Directory improve createDirectoryUnder to allow alternate top directories 2022-08-12 12:52:37 -04:00
External rclone special remote 2024-04-17 15:20:37 -04:00
Helper proxying to local git remotes works 2024-06-12 10:10:11 -04:00
List auto-init autoenable=yes 2020-05-27 12:40:35 -04:00
Rsync add newtypes for QuickCheck to avoid LANG=C issues 2020-11-09 20:21:18 -04:00
WebDAV Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
Adb.hs run codespell throughout fixing typos automagically 2024-05-01 15:46:21 -04:00
BitTorrent.hs support VURL backend 2024-02-29 13:48:51 -04:00
Borg.hs implement Unavilable for borg bup ddar directory rsync 2023-08-16 15:48:09 -04:00
Bup.hs implement Unavilable for borg bup ddar directory rsync 2023-08-16 15:48:09 -04:00
Ddar.hs implement Unavilable for borg bup ddar directory rsync 2023-08-16 15:48:09 -04:00
Directory.hs run codespell throughout fixing typos automagically 2024-05-01 15:46:21 -04:00
External.hs avoid accepting externaltype= and readonly= parameters for rclone 2024-04-17 15:41:55 -04:00
GCrypt.hs eliminate s2w8 and w82s 2023-10-26 13:12:57 -04:00
Git.hs remove dead nodes when loading the cluster log 2024-06-16 14:39:44 -04:00
GitLFS.hs Removed the vendored git-lfs and the GitLfs build flag 2023-08-28 13:12:31 -04:00
Glacier.hs let Remote.availability return Unavilable 2023-08-16 14:31:31 -04:00
Hook.hs let Remote.availability return Unavilable 2023-08-16 14:31:31 -04:00
HttpAlso.hs let Remote.availability return Unavilable 2023-08-16 14:31:31 -04:00
List.hs clarify comment 2024-06-04 14:29:24 -04:00
P2P.hs git-annex-shell: block relay requests 2024-06-10 14:16:27 -04:00
Rclone.hs rclone special remote 2024-04-17 15:20:37 -04:00
Rsync.hs export tree: avoid confusing output about renaming files 2024-03-09 13:50:26 -04:00
S3.hs export tree: avoid confusing output about renaming files 2024-03-09 13:50:26 -04:00
Tahoe.hs disk free checking for unsized keys 2024-01-16 14:29:10 -04:00
Web.hs implement URL to VURL migration 2024-03-01 16:42:02 -04:00
WebDAV.hs export tree: avoid confusing output about renaming files 2024-03-09 13:50:26 -04:00