git-annex/Remote
Joey Hess 69f8e6c7c0
ImportableContentsChunkable
This improves the borg special remote memory usage, by
letting it only load one archive's worth of filenames into memory at a
time, and building up a larger tree out of the chunks.

When a borg repository has many archives, git-annex could easily OOM
before. Now, it will use only memory proportional to the number of
annexed keys in an archive.

Minor implementation wart: Each new chunk re-opens the content
identifier database, and also a new vector clock is used for each chunk.
This is a minor innefficiency only; the use of continuations makes
it hard to avoid, although putting the database handle into a Reader
monad would be one way to fix it.

It may later be possible to extend the ImportableContentsChunkable
interface to remotes that are not third-party populated. However, that
would perhaps need an interface that does not use continuations.

The ImportableContentsChunkable interface currently does not allow
populating the top of the tree with anything other than subtrees. It
would be easy to extend it to allow putting files in that tree, but borg
doesn't need that so I left it out for now.

Sponsored-by: Noam Kremen on Patreon
2021-10-08 13:15:22 -04:00
..
Directory incremental hashing for fileRetriever 2021-08-13 15:43:29 -04:00
External convert Key to ShortByteString 2021-10-05 20:20:08 -04:00
Helper ImportableContentsChunkable 2021-10-08 13:15:22 -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 fix exporting when the file is in the top of the repo 2021-03-16 14:17:29 -04:00
Adb.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00
BitTorrent.hs incremental verification for web special remote 2021-08-18 15:02:22 -04:00
Borg.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00
Bup.hs incremental verify for byteRetriever special remotes 2021-08-11 14:20:38 -04:00
Ddar.hs incremental verify for byteRetriever special remotes 2021-08-11 14:20:38 -04:00
Directory.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00
External.hs improve url download failure display 2021-09-01 15:33:38 -04:00
GCrypt.hs incremental verify for directory special remote 2021-08-16 16:51:33 -04:00
Git.hs simplify annex.bwlimit handling 2021-09-22 10:52:01 -04:00
GitLFS.hs convert Key to ShortByteString 2021-10-05 20:20:08 -04:00
Glacier.hs fix build with ghc 9.0.1 2021-09-07 16:53:07 -04:00
Hook.hs incremental verify for directory special remote 2021-08-16 16:51:33 -04:00
HttpAlso.hs incremental verification for gitlfs and httpalso 2021-08-18 15:17:10 -04:00
List.hs start borg special remote 2020-12-18 16:03:51 -04:00
P2P.hs bwlimit 2021-09-21 16:58:10 -04:00
Rsync.hs incremental verify for directory special remote 2021-08-16 16:51:33 -04:00
S3.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00
Tahoe.hs plumb VerifyConfig into retrieveKeyFile 2021-08-17 12:43:13 -04:00
Web.hs improve url download failure display 2021-09-01 15:33:38 -04:00
WebDAV.hs distinguish between incremental verification failing and not being done 2021-08-18 14:38:02 -04:00