yarikoptic [Thu, 4 Jan 2024 20:23:34 +0000 (20:23 +0000)]
new issue about stalling transfers
Joey Hess [Wed, 3 Jan 2024 19:22:03 +0000 (15:22 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 3 Jan 2024 19:07:49 +0000 (15:07 -0400)]
optimise adjustTree when adding many TreeItems
The old code traversed the list of addtreeitems once per subdirectory in
the tree, so could get quite slow. Converting to Map lookups sped it up
significantly.
In my test case, git-annex import used to take about 2 minutes, when
calling adjustTree to add back excluded files to the imported tree. This
dropped it down to 6 seconds. Of which 4 seconds are the actual
enumeration of the contents of the remote, so really only 2 seconds for
this.
The path prefix map is a bit suboptimal memory-wise, since items get
stored in the map once per subdirectory on the path to the item. It
would perhaps be better to use a tree data structure.
Also it's suboptimal memory-wise that it builds two maps, as well
as retaining a reference to addtreeitems. I could not see a way around
that though.
Sponsored-by: Luke T. Shumaker on Patreon
kdm9 [Wed, 3 Jan 2024 09:03:44 +0000 (09:03 +0000)]
Added a comment: confirmed fixed
Joey Hess [Tue, 2 Jan 2024 20:32:52 +0000 (16:32 -0400)]
todo
Joey Hess [Tue, 2 Jan 2024 18:10:52 +0000 (14:10 -0400)]
bump copyright year
after my first commit of 2024
Joey Hess [Tue, 2 Jan 2024 18:08:01 +0000 (14:08 -0400)]
comment
Joey Hess [Tue, 2 Jan 2024 17:59:55 +0000 (13:59 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 2 Jan 2024 17:56:50 +0000 (13:56 -0400)]
import: Sped up import from special remote when the imported tree is unchanged
I saw a nearly 2 minute speed up from this, in a repo with 56000 files some
of which are preferred content of the special remote and others not. In
such a case, addBackExportExcluded has to do a lot of work, which is
unncessary when the tree is unchanged.
When using sync --content, preferred content checking of that many files
takes about 1 minute. So this speeds up sync --content by 3x.
When using git-annex import, the speed up is much larger.
Sponsored-by: Nicholas Golder-Manning on Patreon
lemondata [Tue, 2 Jan 2024 15:44:21 +0000 (15:44 +0000)]
Added a comment
Lukey [Sun, 31 Dec 2023 14:41:18 +0000 (14:41 +0000)]
Added a comment
jgsuess@732b8c62c50d8595d7b1d58eea11e5019c2308b1 [Sun, 31 Dec 2023 09:46:53 +0000 (09:46 +0000)]
Added a comment: Scanning for files in ghost repos
jgsuess@732b8c62c50d8595d7b1d58eea11e5019c2308b1 [Sun, 31 Dec 2023 09:41:13 +0000 (09:41 +0000)]
Added a comment: wrong parameter used - `repository` is not a subcommand
jgsuess@732b8c62c50d8595d7b1d58eea11e5019c2308b1 [Sun, 31 Dec 2023 09:35:16 +0000 (09:35 +0000)]
Lukey [Sat, 30 Dec 2023 11:35:22 +0000 (11:35 +0000)]
Added a comment
Lukey [Sat, 30 Dec 2023 10:51:29 +0000 (10:51 +0000)]
Lukey [Sat, 30 Dec 2023 10:49:32 +0000 (10:49 +0000)]
Joey Hess [Fri, 29 Dec 2023 17:23:27 +0000 (13:23 -0400)]
remove slightly incorrect comments
Atemu [Fri, 29 Dec 2023 17:06:37 +0000 (17:06 +0000)]
Added a comment
Joey Hess [Fri, 29 Dec 2023 16:09:30 +0000 (12:09 -0400)]
info: Added "annex sizes of repositories" table to the overall display
Thanks to previous work in
11cc9f19339b5fa80f238e42407eb9ed87cf8855,
this is almost entirely free, it only needs to do some additional map
lookups and math.
The strictness annotations keep the memory use from blowing up.
Sponsored-by: unqueued on Patreon
Joey Hess [Fri, 29 Dec 2023 14:51:05 +0000 (10:51 -0400)]
optimisation
Joey Hess [Fri, 29 Dec 2023 14:48:12 +0000 (10:48 -0400)]
plan
Joey Hess [Fri, 29 Dec 2023 14:36:11 +0000 (10:36 -0400)]
todo
psxvoid [Thu, 28 Dec 2023 05:33:13 +0000 (05:33 +0000)]
Added a comment: Works: Try annex.queuesize and --not --in
Joey Hess [Wed, 27 Dec 2023 23:28:01 +0000 (19:28 -0400)]
add news item for git-annex 10.
20231227
Joey Hess [Wed, 27 Dec 2023 23:27:55 +0000 (19:27 -0400)]
releasing package git-annex version 10.
20231227
Joey Hess [Wed, 27 Dec 2023 23:11:15 +0000 (19:11 -0400)]
Revert "import Data.Time.Clock to build with time-1.9.1"
This reverts commit
7484191284304e2581e8ef2496bf7d4f1825f12e.
Not necessary after all.
Joey Hess [Wed, 27 Dec 2023 20:58:40 +0000 (16:58 -0400)]
import Data.Time.Clock to build with time-1.9.1
In more recent versions Data.Time exports secondsToNominalDiffTime etc,
but originally it did not.
Joey Hess [Wed, 27 Dec 2023 19:33:46 +0000 (15:33 -0400)]
fix build with old version of time package
Can't truncate timestamp resolution with that version.
nobodyinperson [Wed, 27 Dec 2023 07:51:54 +0000 (07:51 +0000)]
removed
nobodyinperson [Wed, 27 Dec 2023 07:51:34 +0000 (07:51 +0000)]
removed
nobodyinperson [Wed, 27 Dec 2023 07:51:00 +0000 (07:51 +0000)]
Added a comment: Try annex.queuesize and --not --in
nobodyinperson [Wed, 27 Dec 2023 07:50:49 +0000 (07:50 +0000)]
Added a comment: Try anex.queuesize and --not --in
nobodyinperson [Wed, 27 Dec 2023 07:50:38 +0000 (07:50 +0000)]
Added a comment: Try anex.queuesize and --not --in
psxvoid [Wed, 27 Dec 2023 06:08:59 +0000 (06:08 +0000)]
Added a comment: The issue with slow connection and huge repo - no batches
Joey Hess [Tue, 26 Dec 2023 23:39:01 +0000 (19:39 -0400)]
avoid build warnings
Joey Hess [Tue, 26 Dec 2023 22:31:52 +0000 (18:31 -0400)]
use RawFilePath for opening sqlite databases
Fix a crash opening sqlite databases when run in a non-unicode locale,
with a remote that uses a non-unicode filepath. In that situation
converting to Text fails.
The fix needs git-annex to be built with persistent-sqlite 2.13.3.
Building against older versions still works, but that version is used when
building with stack.
Database.RawFilePath is a lot of code copied from persistent-sqlite and
lightly modified, since only 1 function in persistent-sqlite was made to
support RawFilePath. This is a bit of a pain, and I hope that
persistent-sqlite will eventually switch to using OsPath, allowing this
module to be removed from git-annex.
Sponsored-by: k0ld on Patreon
Joey Hess [Tue, 26 Dec 2023 19:56:39 +0000 (15:56 -0400)]
sync, push: Avoid trying to send individual files to special remotes configured with importtree=yes exporttree=no
That will always fail. It already skipped doing this when exporttree=yes.
Joey Hess [Tue, 26 Dec 2023 19:41:03 +0000 (15:41 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 26 Dec 2023 19:40:55 +0000 (15:40 -0400)]
prepping for release
Joey Hess [Tue, 26 Dec 2023 16:56:59 +0000 (12:56 -0400)]
update to lts-22.3
Atemu [Mon, 25 Dec 2023 13:37:58 +0000 (13:37 +0000)]
Added a comment
Atemu [Mon, 25 Dec 2023 13:03:50 +0000 (13:03 +0000)]
Added a comment
Atemu [Mon, 25 Dec 2023 12:21:58 +0000 (12:21 +0000)]
Added a comment
Joey Hess [Wed, 20 Dec 2023 19:56:36 +0000 (15:56 -0400)]
comment
Joey Hess [Wed, 20 Dec 2023 17:12:56 +0000 (13:12 -0400)]
response
Joey Hess [Wed, 20 Dec 2023 16:52:46 +0000 (12:52 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
jkniiv [Tue, 19 Dec 2023 23:12:21 +0000 (23:12 +0000)]
close bug as notabug due to user error
jkniiv [Tue, 19 Dec 2023 23:02:16 +0000 (23:02 +0000)]
Added a comment: my report was actually a User Failure on my part
unqueued [Tue, 19 Dec 2023 18:50:08 +0000 (18:50 +0000)]
Added a comment
Joey Hess [Tue, 19 Dec 2023 01:35:00 +0000 (21:35 -0400)]
refactor
lemondata [Tue, 19 Dec 2023 00:17:00 +0000 (00:17 +0000)]
Joey Hess [Mon, 18 Dec 2023 20:27:26 +0000 (16:27 -0400)]
importtree: support preferred content expressions needing keys
When importing from a special remote, support preferred content expressions
that use terms that match on keys (eg "present", "copies=1"). Such terms
are ignored when importing, since the key is not known yet.
When "standard" or "groupwanted" is used, the terms in those
expressions also get pruned accordingly.
This does allow setting preferred content to "not (copies=1)" to make a
special remote into a "source" type of repository. Importing from it will
import all files. Then exporting to it will drop all files from it.
In the case of setting preferred content to "present", it's pruned on
import, so everything gets imported from it. Then on export, it's applied,
and everything in it is left on it, and no new content is exported to it.
Since the old behavior on these preferred content expressions was for
importtree to error out, there's no backwards compatability to worry about.
Except that sync/pull/etc will now import where before it errored out.
Joey Hess [Mon, 18 Dec 2023 17:56:08 +0000 (13:56 -0400)]
comment
Joey Hess [Mon, 18 Dec 2023 17:49:53 +0000 (13:49 -0400)]
comment
Joey Hess [Mon, 18 Dec 2023 17:40:23 +0000 (13:40 -0400)]
fix a typo
Joey Hess [Mon, 18 Dec 2023 16:37:57 +0000 (12:37 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Atemu [Mon, 18 Dec 2023 12:08:08 +0000 (12:08 +0000)]
Added a comment
nobodyinperson [Sun, 17 Dec 2023 19:04:41 +0000 (19:04 +0000)]
Added a comment: numcopies is no the target
Atemu [Sun, 17 Dec 2023 16:28:19 +0000 (16:28 +0000)]
oadams [Sat, 16 Dec 2023 21:37:22 +0000 (21:37 +0000)]
Added a comment
Joey Hess [Sat, 16 Dec 2023 21:07:11 +0000 (17:07 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
aaa [Tue, 12 Dec 2023 22:29:24 +0000 (22:29 +0000)]
Added a comment: Key permissions
jkniiv [Tue, 12 Dec 2023 19:25:17 +0000 (19:25 +0000)]
Added a comment
Joey Hess [Tue, 12 Dec 2023 14:49:46 +0000 (10:49 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
imlew [Tue, 12 Dec 2023 13:36:21 +0000 (13:36 +0000)]
Added a comment
imlew [Tue, 12 Dec 2023 13:32:17 +0000 (13:32 +0000)]
Added a comment
nobodyinperson [Tue, 12 Dec 2023 12:44:38 +0000 (12:44 +0000)]
Added a comment
imlew [Tue, 12 Dec 2023 11:56:06 +0000 (11:56 +0000)]
Added a comment
Joey Hess [Mon, 11 Dec 2023 19:04:06 +0000 (15:04 -0400)]
Lower precision of timestamps in git-annex branch
This can reduce the size of the branch by up to 8%. My test was
running git-annex add 1000 times on one file each.
Lots of different high-resolution timestamps were recorded before
and eliminating those, after packing, the git repo was 8% smaller.
Due to the use of vector clocks, high resolution timestamps are
not necessary to make clear which information is most recent when
eg, a value is changed repeatedly in the same second. In such a
case, the vector clock will be advanced to the next second after
the last modification. For example, running
git-annex numcopies 1; git-annex numcopies 2
The first will record the current second, while the next records
the second after that even if it runs in the same second.
As for conflicting information written to two different clones of the
repository, this will make git-annex sometimes pick information that
was written earlier in a second over information written later in the
same second. Usually git-annex does not write conflicting information,
but there are some cases where it could. Eg, storing an object on a remote
can update the remote state log with some state. If two repos both store the
same object, and end up storing different remote state for some reason,
this can result in one that ran a tiny bit later winning. Such a situation
seems unlikely to be user visible. And a small amount of clock skew could
already result in such things.
The only case I can think of where this might be a user visible change
is if a configuration command like git-annex numcopies is being run
in 2 clones of a repository on the same machine at very
close to the same time. Then the user will know which they ran last,
and git-annex won't.
If that did become a problem, this could be dialed back to eg log
milliseconds with still some space saving.
Joey Hess [Fri, 8 Dec 2023 20:22:14 +0000 (16:22 -0400)]
migrate: support adding size back to URL keys
migrate: Support adding size to URL keys that were added with --relaxed, by
running eg: git-annex migrate --backend=URL foo
Since url keys cannot be generated, that used to fail. Make it notice that
the backend is not changed, and just get the size of the content.
Sponsored-by: Brock Spratlen on Patreon
Joey Hess [Fri, 8 Dec 2023 18:39:38 +0000 (14:39 -0400)]
update for distributed migration
Joey Hess [Fri, 8 Dec 2023 18:26:26 +0000 (14:26 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 8 Dec 2023 18:25:05 +0000 (14:25 -0400)]
split out todo for special remotes and close the main todo
Joey Hess [Fri, 8 Dec 2023 18:18:23 +0000 (14:18 -0400)]
Merge branch 'master' into distributedmigration
Joey Hess [Fri, 8 Dec 2023 18:18:18 +0000 (14:18 -0400)]
distributed migration for pull and sync --content
pull, sync: When operating on content, automatically hard link objects
that have been migrated.
Added annex.syncmigrations config that can be set to false to prevent
pull and sync from migrating object content.
I think that true is a good default for this config, because it avoids
users having to re-download migrated content or learning about migration.
But, some users will surely not like it, whether because it does take some
time (especially for the first git-annex branch scan when there is a long
history), or because they want to deal with it manually, or because their
filesystem doesn't support hard links and they don't want it to copy
objects.
Sponsored-by: k0ld on Patreon
Joey Hess [Fri, 8 Dec 2023 17:23:03 +0000 (13:23 -0400)]
migrate --apply
And avoid migrate --update/--aply migrating when the new key was already
present in the repository, and got dropped. Luckily, the location log
allows distinguishing from the new key never having been present!
That is mostly useful for --apply because otherwise dropped files would
keep coming back until the old objects were reaped as unused. But it
seemed to make sense to also do it for --update. for consistency in edge
cases if nothing else. One case where --update can use it is when one
branch got migrated earlier, and we dropped the file, and now another
branch has migrated the same file.
Sponsored-by: Jack Hill on Patreon
Joey Hess [Fri, 8 Dec 2023 16:39:18 +0000 (12:39 -0400)]
skip distributed migration to insecure key when annex.securehashesonly is set
This only avoids extra work and a warning messsage. It seems likely that
in such a situation, the user does not want migrations to insecure
hashes, and so best to ignore them as much as possible. If
the user merges a branch that switches annexed files to an insecure
hash, they will notice that the file contents are unavailable,
and git-annex get will tell them the problem then. So it does not seem
useful to have migrate --update also complain about it.
jkniiv [Fri, 8 Dec 2023 16:38:12 +0000 (16:38 +0000)]
report on the 'Production' build flag not producing a binary that passes the test suite
Joey Hess [Fri, 8 Dec 2023 16:36:33 +0000 (12:36 -0400)]
fix missing space in warning message
Joey Hess [Fri, 8 Dec 2023 00:05:42 +0000 (20:05 -0400)]
always verify content in distributed migration
doc/todo/distributed_migration.mdwn discusses security of distributed
migration, and this was identified as necessary to do.
Joey Hess [Thu, 7 Dec 2023 22:00:09 +0000 (18:00 -0400)]
display filenames in migrate --update
Have to go to a lot of bother to find them, but I think it's worth it
for usability.
Sponsored-by: Luke T. Shumaker on Patreon
Joey Hess [Thu, 7 Dec 2023 21:26:12 +0000 (17:26 -0400)]
migrate --update fully working
Could use some more testing.
When the old key is not present, Command.ReKey.linkKey' will return
False, so this handles that case ok.
But, I do wonder if distributed migration may need to deal with the old
key getting copied into the repository later. In that situation,
re-running migrate --update won't link it to the new key. It may be that
some users will need that. They can delete .git/annex/migrate.log and
run it again, but that is not a good user interface. Maybe either have
a way to re-run all distributed migrations, or record migrations
in a database and scan the db to find migrations to do in a future run?
Sponsored-by: Kevin Mueller on Patreon
Joey Hess [Thu, 7 Dec 2023 21:03:58 +0000 (17:03 -0400)]
migrate --update gets keys
The git log is outputting the diff, but this only looks at the new
files. When we have a new file, we can get the old filename by just
replacing "new" with "old". And then use branchFileRef to refer to it
allows catting the old key.
While this does have to skip past the old files in the diff, it's still
faster than calling git diff separately.
Sponsored-by: Nicholas Golder-Manning on Patreon
kolam [Thu, 7 Dec 2023 20:16:29 +0000 (20:16 +0000)]
Added a comment
kolam [Thu, 7 Dec 2023 20:13:13 +0000 (20:13 +0000)]
removed
kolam [Thu, 7 Dec 2023 20:12:31 +0000 (20:12 +0000)]
Added a comment
kolam [Thu, 7 Dec 2023 20:08:52 +0000 (20:08 +0000)]
Added a comment
Joey Hess [Thu, 7 Dec 2023 19:50:52 +0000 (15:50 -0400)]
started migrate --update
This is most of the way there, but not quite working.
The layout of migrate.tree/ needs to be changed to follow this approach.
git log will list all the files in tree order, so the new layout needs
to alternate old and new keys. Can that be done? git may not document
tree order, or may not preserve it here.
Alternatively, change to using git log --format=raw and extract
the tree header from that, then use
git diff --raw $tree:migrate.tree/old $tree:migrate.tree/new
That will be a little more expensive, but only when there are lots of
migrations.
Sponsored-by: Joshua Antonishen on Patreon
kolam [Thu, 7 Dec 2023 18:30:40 +0000 (18:30 +0000)]
kolam [Thu, 7 Dec 2023 14:08:54 +0000 (14:08 +0000)]
Added a comment
nobodyinperson [Thu, 7 Dec 2023 08:31:09 +0000 (08:31 +0000)]
Added a comment: Similar to initremote type=git
kolam [Wed, 6 Dec 2023 23:46:49 +0000 (23:46 +0000)]
mike@2d6d71f56ce2a992244350475251df87c26fe351 [Wed, 6 Dec 2023 22:12:47 +0000 (22:12 +0000)]
Added a comment: --includesamecontent same as --not --includesamecontent?
kolam [Wed, 6 Dec 2023 21:08:52 +0000 (21:08 +0000)]
removed
kolam [Wed, 6 Dec 2023 21:08:05 +0000 (21:08 +0000)]
Added a comment
Joey Hess [Wed, 6 Dec 2023 20:27:12 +0000 (16:27 -0400)]
make commitMigration interuption safe
Fixed inversion of control issue, so the tree is recorded
in streamLogFile finalizer.
Sponsored-by: Leon Schuermann on Patreon
Joey Hess [Wed, 6 Dec 2023 19:42:40 +0000 (15:42 -0400)]
comment
Joey Hess [Wed, 6 Dec 2023 19:38:01 +0000 (15:38 -0400)]
log migration trees to git-annex branch
This will allow distributed migration: Start a migration in one clone of
a repo, and then update other clones.
commitMigration is a bit of a bear.. There is some inversion of control
that needs some TMVars. Also streamLogFile's finalizer does not handle
recording the trees, so an interrupt at just the wrong time can cause
migration.log to be emptied but the git-annex branch not updated.
Sponsored-by: Graham Spencer on Patreon