git-annex/Git
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
..
Command update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Remote Removed support for git versions older than 2.1 2019-09-11 16:14:43 -04:00
AutoCorrect.hs all commands building except for assistant 2019-12-05 14:41:18 -04:00
Branch.hs sync --quiet 2021-07-19 11:28:47 -04:00
BuildVersion.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CatFile.hs separate handles for cat-file and cat-file --batch-check 2021-09-24 13:16:13 -04:00
CheckAttr.hs mincopies 2021-01-06 14:15:19 -04:00
CheckIgnore.hs more RawFilePath conversion 2020-11-03 10:11:04 -04:00
Command.hs fixed reconcileStaged crash when index is locked or in conflict 2021-05-24 11:33:23 -04:00
Config.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
ConfigTypes.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Construct.hs make remoteKeyToRemoteName safer 2021-04-23 13:29:21 -04:00
Credential.hs started converting Ref from String to ByteString 2020-04-06 17:14:49 -04:00
CurrentRepo.hs avoid making absolute git remote path relative 2021-02-08 13:18:01 -04:00
DiffTree.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
DiffTreeItem.hs ByteString Ref continued 2020-04-07 11:54:27 -04:00
Env.hs convert TopFilePath to use RawFilePath 2019-12-09 15:07:21 -04:00
FileMode.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Filename.hs add newtypes for QuickCheck to avoid LANG=C issues 2020-11-09 20:21:18 -04:00
FilePath.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00
Fsck.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
GCrypt.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
HashObject.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00
History.hs convert to withCreateProcess for async exception safety 2020-06-03 15:48:09 -04:00
Hook.hs fix build on windows 2020-11-20 12:53:25 -04:00
Index.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
LockFile.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
LsFiles.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
LsTree.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Merge.hs sync --quiet 2021-07-19 11:28:47 -04:00
Objects.hs more RawFilePath conversion 2020-11-05 18:45:37 -04:00
Queue.hs Git.Queue: allow providing git common options like -c 2021-01-04 12:51:55 -04:00
Ref.hs remove errant print debug 2021-10-03 18:18:04 -04:00
RefLog.hs ByteString Ref continued 2020-04-07 11:54:27 -04:00
Remote.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Repair.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Sha.hs started converting Ref from String to ByteString 2020-04-06 17:14:49 -04:00
Ssh.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Status.hs convert TopFilePath to use RawFilePath 2019-12-09 15:07:21 -04:00
Tree.hs ImportableContentsChunkable 2021-10-08 13:15:22 -04:00
Types.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
UnionMerge.hs fix all remaining -Wincomplete-uni-patterns warnings 2020-04-15 13:55:08 -04:00
UpdateIndex.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
Url.hs avoid partial functions in Git.Url 2021-01-18 15:07:23 -04:00
Version.hs more RawFilePath conversion 2020-10-29 12:03:50 -04:00