todo
authorJoey Hess <joeyh@joeyh.name>
Fri, 8 Oct 2021 17:26:40 +0000 (13:26 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 8 Oct 2021 17:26:40 +0000 (13:26 -0400)
doc/todo/avoid_storing_contentidentifier_log_for_borg.mdwn [new file with mode: 0644]

diff --git a/doc/todo/avoid_storing_contentidentifier_log_for_borg.mdwn b/doc/todo/avoid_storing_contentidentifier_log_for_borg.mdwn
new file mode 100644 (file)
index 0000000..453d312
--- /dev/null
@@ -0,0 +1,20 @@
+Borg uses an empty ContentIdentifier for everything; it does not need to
+record anything. But that empty value gets stored in the log for each key
+that is stored in borg. This unncessarily bloats the size of the git-annex
+branch, by one content identifier per key stored in borg.
+
+I think that it also slows down importing many archives from borg,
+because for each of them it has to record the content identifier,
+which is always the same, but still results in a db write.
+
+Omitting storing any ContentIdentifier would break code such as
+Remote.Helper.ExportImport's retrieveKeyFileFromImport.
+
+If the borg Remote could indicate with a flag that it does not use
+ContentIdentifiers, then code like that could pass it a null
+ContentIdentifier without needing to read it from the db.
+
+Annex.Import uses getContentIdentifierKeys, but only when it's not
+thirdpartypopulated. So this change would not break that for borg,
+but a clean way to handle that would be to make it also return a null
+ContentIdentifier when the remote has the flag set. --[[Joey]]