git-annex.git
5 years agodisplay scanning message whenever reconcileStaged has enough files to chew on
Joey Hess [Tue, 8 Jun 2021 16:48:30 +0000 (12:48 -0400)]
display scanning message whenever reconcileStaged has enough files to chew on

Clear visible progress bar first.

Removed showSideActionAfter because it can't be used in reconcileStaged
(import loop). Instead, it counts the number of files it
processes and displays it after it's seen a sufficient to know it's
taking a while.

Sponsored-by: Dartmouth College's Datalad project
5 years agoclarification
Joey Hess [Tue, 8 Jun 2021 16:00:01 +0000 (12:00 -0400)]
clarification

5 years agoadd debugging for reconcileStaged calls for benchmarking
Joey Hess [Tue, 8 Jun 2021 15:57:23 +0000 (11:57 -0400)]
add debugging for reconcileStaged calls for benchmarking

5 years agoscanAnnexedFiles in smudge --update
Joey Hess [Tue, 8 Jun 2021 15:34:46 +0000 (11:34 -0400)]
scanAnnexedFiles in smudge --update

This makes git checkout and git merge hooks do the work to catch up with
changes that they made to the tree. Rather than doing it at some later
point when the user is not thinking about that past operation.

Sponsored-by: Dartmouth College's Datalad project
5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 8 Jun 2021 15:13:09 +0000 (11:13 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoclaw back annexed file scan speedup
Joey Hess [Tue, 8 Jun 2021 15:09:15 +0000 (11:09 -0400)]
claw back annexed file scan speedup

Following commit c941ab6f5b98becfa2880cb69cbc2c4a39057cd9, this avoids
the second, redundant scan when annex.thin is not set.

The benchmark now runs in 35.5 seconds, down from 40 seconds.

Note that the inode cache of the annex object has to be passed to
addInodeCaches now, because it might not already be in the inode caches,
unlike previously.

Sponsored-by: Dartmouth College's Datalad project
5 years agoimprove comment
Joey Hess [Tue, 8 Jun 2021 14:43:48 +0000 (10:43 -0400)]
improve comment

remove obsolete part about a commit preventing it seeing changes

5 years agoAdded a comment: slow down is OSX specific
yarikoptic [Tue, 8 Jun 2021 14:28:18 +0000 (14:28 +0000)]
Added a comment: slow down is OSX specific

5 years agocomment
Joey Hess [Tue, 8 Jun 2021 14:19:04 +0000 (10:19 -0400)]
comment

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 8 Jun 2021 13:42:57 +0000 (09:42 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoavoid double work in git-annex init, second try
Joey Hess [Tue, 8 Jun 2021 13:27:53 +0000 (09:27 -0400)]
avoid double work in git-annex init, second try

reconcileStaged populates the db, so scanAnnexedFiles does not need to
do it again. It still makes a pass over the HEAD tree, but populating
the db was most of the expensive part.

Benchmarking with 100,000 files, git-annex init now takes 40 seconds,
vs 37 seconds with the old, buggy version of this fix. It should be
possible to win those 3 precious seconds per 100k files back, in the
case when when annex.thin is not set, with improvements to reconcileStaged
that avoid needing this second pass.

Sponsored-by: Dartmouth College's Datalad project
5 years agostop using addAssociatedFileFast
Joey Hess [Tue, 8 Jun 2021 13:23:28 +0000 (09:23 -0400)]
stop using addAssociatedFileFast

Use addAssociatedFile instead, after recent optimisations it seems just
as fast.

5 years agoRevert "avoid double work in git-annex init"
Joey Hess [Tue, 8 Jun 2021 13:11:24 +0000 (09:11 -0400)]
Revert "avoid double work in git-annex init"

This reverts commit 0f10f208a7c76061b7d48aaa7ea0fa8e641cace3.

The implementation of this turns out to be unsafe; it can lead to a keys
db deadlock. scanAnnexedFiles injects a call to inAnnex into
reconcileStaged, but inAnnex sometimes needs to read from the keys db,
which will try to re-open it when it's in the process of being opened.
The exclusive lock of gitAnnexKeysDbLock will then deadlock.

This needs to be done in some other way...

5 years agofaster associated file replacement with upsert
Joey Hess [Tue, 8 Jun 2021 11:09:07 +0000 (07:09 -0400)]
faster associated file replacement with upsert

Rather than first deleting and then inserting, upsert lets the key
associated with a file be updated in place.

Benchmarked with 100,000 files, and an empty keys database, running
reconcileStaged. It improved from 47 seconds to 34 seconds.
So this got reconcileStaged to be as fast as scanAssociatedFiles,
or faster -- scanAssociatedFiles benchmarks at 37 seconds.

(Also checked for other users of deleteWhere that could be sped up by
upsert. There are a couple, but they are not in performance critical
code paths, eg recordExportTreeCurrent is only run once per tree
export.)

I would have liked to rename FileKeyIndex to FileKeyUnique since it is
being used as a uniqueness constraint now, not just to get an index.
But, that gets converted into part of the SQL schema, and the name
is used by the upsert, so it can't be changed.

Sponsored-by: Dartmouth College's Datalad project
5 years agoAdded a comment
yarikoptic [Mon, 7 Jun 2021 21:39:05 +0000 (21:39 +0000)]
Added a comment

5 years agoAdded a comment: clarification
yarikoptic [Mon, 7 Jun 2021 21:20:35 +0000 (21:20 +0000)]
Added a comment: clarification

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 7 Jun 2021 21:02:15 +0000 (17:02 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agotodo
Joey Hess [Mon, 7 Jun 2021 20:58:35 +0000 (16:58 -0400)]
todo

5 years agoavoid double work in git-annex init
Joey Hess [Mon, 7 Jun 2021 20:50:14 +0000 (16:50 -0400)]
avoid double work in git-annex init

reconcileStaged was doing a redundant scan to scannAnnexedFiles.

It would probably make sense to move the body of scannAnnexedFiles
into reconcileStaged, the separation does not really serve any purpose.

Sponsored-by: Dartmouth College's Datalad project
5 years agooptimise reconcileStaged with git cat-file streaming
Joey Hess [Mon, 7 Jun 2021 18:51:38 +0000 (14:51 -0400)]
optimise reconcileStaged with git cat-file streaming

Commit 428c91606b434512d1986622e751c795edf4df44 made it need to do more
work in situations like switching between very different branches.

Compare with seekFilteredKeys which has a similar optimisation. Might be
possible to factor out the common part from these?

Sponsored-by: Dartmouth College's Datalad project
5 years agoremove unnecessary liftIO
Joey Hess [Mon, 7 Jun 2021 18:51:12 +0000 (14:51 -0400)]
remove unnecessary liftIO

5 years agoAdded a comment: deferring the scan
Ilya_Shlyakhter [Mon, 7 Jun 2021 17:41:45 +0000 (17:41 +0000)]
Added a comment: deferring the scan

5 years agocomment
Joey Hess [Mon, 7 Jun 2021 17:28:36 +0000 (13:28 -0400)]
comment

5 years agofix link
Joey Hess [Mon, 7 Jun 2021 17:06:16 +0000 (13:06 -0400)]
fix link

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 7 Jun 2021 16:59:21 +0000 (12:59 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agocorrectly update keys db in merge conflict
Joey Hess [Mon, 7 Jun 2021 16:52:36 +0000 (12:52 -0400)]
correctly update keys db in merge conflict

This is quite a subtle edge case, see the bug report for full details.

The second git diff is needed only when there's a merge conflict.
It would be possible to speed it up marginally by using
--diff-filter=Unmerged, but probably not enough to bother with.

Sponsored-by: Graham Spencer on Patreon
5 years agoAdded a comment: deferring the keys-to-files scan
Ilya_Shlyakhter [Mon, 7 Jun 2021 16:11:01 +0000 (16:11 +0000)]
Added a comment: deferring the keys-to-files scan

5 years agocomment
Joey Hess [Mon, 7 Jun 2021 15:53:25 +0000 (11:53 -0400)]
comment

5 years agocomment
Joey Hess [Mon, 7 Jun 2021 15:49:28 +0000 (11:49 -0400)]
comment

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 7 Jun 2021 15:47:13 +0000 (11:47 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agocomment
Joey Hess [Mon, 7 Jun 2021 15:46:47 +0000 (11:46 -0400)]
comment

5 years agoadded suggestion to match keys by file extension in the key
Ilya_Shlyakhter [Mon, 7 Jun 2021 15:08:51 +0000 (15:08 +0000)]
added suggestion to match keys by file extension in the key

5 years agoAdded a comment: keeping connected files together
Ilya_Shlyakhter [Mon, 7 Jun 2021 14:45:35 +0000 (14:45 +0000)]
Added a comment: keeping connected files together

5 years ago(no commit message)
jwodder [Mon, 7 Jun 2021 14:32:25 +0000 (14:32 +0000)]

5 years agoremoved
Ilya_Shlyakhter [Mon, 7 Jun 2021 14:31:52 +0000 (14:31 +0000)]
removed

5 years agoAdded a comment: specifying preferred content by metadata
Ilya_Shlyakhter [Mon, 7 Jun 2021 14:26:57 +0000 (14:26 +0000)]
Added a comment: specifying preferred content by metadata

5 years agoAdded a comment: specifying preferred content by metadata
Ilya_Shlyakhter [Mon, 7 Jun 2021 14:26:27 +0000 (14:26 +0000)]
Added a comment: specifying preferred content by metadata

5 years agoAdded a comment
Atemu [Sun, 6 Jun 2021 20:47:31 +0000 (20:47 +0000)]
Added a comment

5 years agoAdded a comment
Lukey [Sun, 6 Jun 2021 18:01:08 +0000 (18:01 +0000)]
Added a comment

5 years ago(no commit message)
Atemu [Sun, 6 Jun 2021 17:18:14 +0000 (17:18 +0000)]

5 years agorename bugs/delayadd_doesn__39__t_work.mdwn to bugs/delayadd_doesn__39__t_work_with_s...
Atemu [Sun, 6 Jun 2021 16:50:40 +0000 (16:50 +0000)]
rename bugs/delayadd_doesn__39__t_work.mdwn to bugs/delayadd_doesn__39__t_work_with_smallfiles.mdwn

5 years agoAdded a comment: using import tree and export tree
jenkin.schibel@286264d9ceb79998aecff0d5d1a4ffe34f8b8421 [Sun, 6 Jun 2021 14:43:40 +0000 (14:43 +0000)]
Added a comment: using import tree and export tree

5 years agoAdd bug report
falsifian [Sat, 5 Jun 2021 20:31:39 +0000 (20:31 +0000)]
Add bug report

5 years agoAdded a comment
yarikoptic [Sat, 5 Jun 2021 13:50:43 +0000 (13:50 +0000)]
Added a comment

5 years agoInitial report on performance regression
yarikoptic [Sat, 5 Jun 2021 13:23:13 +0000 (13:23 +0000)]
Initial report on performance regression

5 years agoAdded a comment
alt [Sat, 5 Jun 2021 13:07:48 +0000 (13:07 +0000)]
Added a comment

5 years agoAdded a comment
lucas.gautheron@09f1983993dfb0907d02ba268b3ca672f1dc3eea [Sat, 5 Jun 2021 10:10:57 +0000 (10:10 +0000)]
Added a comment

5 years agoAdded a comment: "why all these wild ideas are being thrown out there"
Ilya_Shlyakhter [Fri, 4 Jun 2021 22:15:33 +0000 (22:15 +0000)]
Added a comment: "why all these wild ideas are being thrown out there"

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Fri, 4 Jun 2021 20:45:02 +0000 (16:45 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years ago--size-limit exit 101
Joey Hess [Fri, 4 Jun 2021 20:43:47 +0000 (16:43 -0400)]
--size-limit exit 101

Sponsored-by: Mark Reidenbach on Patreon
5 years ago(no commit message)
Atemu [Fri, 4 Jun 2021 20:26:27 +0000 (20:26 +0000)]

5 years agoadd --size-limit option
Joey Hess [Fri, 4 Jun 2021 20:08:42 +0000 (16:08 -0400)]
add --size-limit option

When this option is not used, there should be effectively no added
overhead, thanks to the optimisation in
b3cd0cc6ba4e5b9e2ae0abd9c8b2ec32475e09d2.

When an action fails on a file, the size of the file still counts toward
the size limit. This was necessary to support concurrency, but also
generally seems like the right choice.

Most commands that operate on annexed files support the option.
export and import do not, and I don't know if it would make sense for
export to.. Why would you want an incomplete export? sync doesn't, and
while it would be easy to make it support it for transferring files,
it's not clear if dropping files should also take the size limit into
account. Commands like add that don't operate on annexed files don't
support the option either.

Exiting 101 not yet implemented.

Sponsored-by: Denis Dzyubenko on Patreon
5 years agominor optimisation
Joey Hess [Fri, 4 Jun 2021 18:56:31 +0000 (14:56 -0400)]
minor optimisation

Avoid a second mvar access.

Sponsored-by: Jochen Bartl on Patreon
5 years agocomment
Joey Hess [Fri, 4 Jun 2021 18:00:58 +0000 (14:00 -0400)]
comment

5 years agocomment
Joey Hess [Fri, 4 Jun 2021 17:53:24 +0000 (13:53 -0400)]
comment

5 years agocomment
Joey Hess [Fri, 4 Jun 2021 17:36:51 +0000 (13:36 -0400)]
comment

5 years agoavoid displaying the scanning annexed files message when repo is not large
Joey Hess [Fri, 4 Jun 2021 17:16:48 +0000 (13:16 -0400)]
avoid displaying the scanning annexed files message when repo is not large

Avoids users thinking this scan is a big deal, when it's not in the
majority of repos.

showSideActionAfter has some ugly caveats, since it has to display in
the background of another action. I could not see a better way to do it
and it works fine in this particular case. It also doesn't really belong
in Annex.Concurrent, but cannot go in Messages due to an import loop.

Sponsored-by: Dartmouth College's Datalad project
5 years agocomment
Joey Hess [Fri, 4 Jun 2021 17:14:29 +0000 (13:14 -0400)]
comment

5 years agoabout "scanning for annexed" while in git-annex branch
yarikoptic [Fri, 4 Jun 2021 15:20:34 +0000 (15:20 +0000)]
about "scanning for annexed" while in git-annex branch

5 years agoAdded a comment
alt [Fri, 4 Jun 2021 10:13:06 +0000 (10:13 +0000)]
Added a comment

5 years ago(no commit message)
Atemu [Thu, 3 Jun 2021 13:36:20 +0000 (13:36 +0000)]

5 years agoAdded a comment: matching include/exclude based on file extension in the key
Ilya_Shlyakhter [Wed, 2 Jun 2021 17:02:58 +0000 (17:02 +0000)]
Added a comment: matching include/exclude based on file extension in the key

5 years agoAdded a comment: keys db optimization
Ilya_Shlyakhter [Wed, 2 Jun 2021 16:53:03 +0000 (16:53 +0000)]
Added a comment: keys db optimization

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 1 Jun 2021 15:43:36 +0000 (11:43 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoavoid removing old associated file when there is a merge conflict
Joey Hess [Tue, 1 Jun 2021 15:24:15 +0000 (11:24 -0400)]
avoid removing old associated file when there is a merge conflict

It makes sense to keep the key used by the old version of an
associated file, until the merge conflict is resolved.

Note that, since in this case git diff is being run with --index, it's
not possible to use -1 or -3, which would let the keys
associated with the new versions of the file also be added. That would
be better, because it's possible that the local modification to the file
that caused the merge conflict has not yet gotten its new key recorded
in the db.

Opened a bug about a case this is thus not able to address.

Sponsored-by: Boyd Stephen Smith Jr. on Patreon
5 years agotodo
Joey Hess [Tue, 1 Jun 2021 14:39:48 +0000 (10:39 -0400)]
todo

5 years agoAdded a comment: keys-to-paths db
Ilya_Shlyakhter [Mon, 31 May 2021 23:15:21 +0000 (23:15 +0000)]
Added a comment: keys-to-paths db

5 years agocomments
Joey Hess [Mon, 31 May 2021 21:54:17 +0000 (17:54 -0400)]
comments

5 years agoAdded a comment: startup scan for files
Ilya_Shlyakhter [Mon, 31 May 2021 20:50:36 +0000 (20:50 +0000)]
Added a comment: startup scan for files

5 years agoAdded a comment
Lukey [Mon, 31 May 2021 19:26:52 +0000 (19:26 +0000)]
Added a comment

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 31 May 2021 19:19:34 +0000 (15:19 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoAdded a comment
Lukey [Mon, 31 May 2021 19:17:44 +0000 (19:17 +0000)]
Added a comment

5 years agocomment
Joey Hess [Mon, 31 May 2021 19:15:09 +0000 (15:15 -0400)]
comment

5 years agoAdded a comment
Atemu [Mon, 31 May 2021 19:07:31 +0000 (19:07 +0000)]
Added a comment

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 31 May 2021 19:05:40 +0000 (15:05 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agospeed up keys database writes
Joey Hess [Mon, 31 May 2021 18:56:14 +0000 (14:56 -0400)]
speed up keys database writes

There seems to be no reason to check the time here. I think it was
inherited from code in Database.Fsck, which does have a reason to commit
every few minutes. Removing that syscall speeds up a git-annex init
in a repo with 100000 annexed files by about 3 seconds.

Sponsored-by: Dartmouth College's Datalad project
5 years ago(no commit message)
Atemu [Mon, 31 May 2021 18:59:15 +0000 (18:59 +0000)]

5 years ago(no commit message)
Atemu [Mon, 31 May 2021 18:42:56 +0000 (18:42 +0000)]

5 years agospeed up initial scanning for annexed files
Joey Hess [Mon, 31 May 2021 17:40:42 +0000 (13:40 -0400)]
speed up initial scanning for annexed files

Streaming through git this way speeds it up by around 25%. This is
similar to the optimisations of seeking annexed files.

Sponsored-by: Dartmouth College's Datalad project
5 years ago(no commit message)
Atemu [Mon, 31 May 2021 18:19:42 +0000 (18:19 +0000)]

5 years agoannex.supportunlocked should not prevent scan for annexed files
Joey Hess [Mon, 31 May 2021 14:51:39 +0000 (10:51 -0400)]
annex.supportunlocked should not prevent scan for annexed files

That scan used to be only for unlocked files, but no longer..

5 years agotodo
Joey Hess [Mon, 31 May 2021 14:50:22 +0000 (10:50 -0400)]
todo

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 31 May 2021 14:44:35 +0000 (10:44 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agocomment
Joey Hess [Mon, 31 May 2021 14:43:59 +0000 (10:43 -0400)]
comment

5 years agoikiwiki server slowdown
Ilya_Shlyakhter [Sun, 30 May 2021 19:43:27 +0000 (19:43 +0000)]
ikiwiki server slowdown

5 years agoAdded a comment: clarifying preferred content expressions
Ilya_Shlyakhter [Sun, 30 May 2021 19:40:51 +0000 (19:40 +0000)]
Added a comment: clarifying preferred content expressions

5 years agoAdded a comment
Lukey [Sat, 29 May 2021 17:22:40 +0000 (17:22 +0000)]
Added a comment

5 years agoAdded a comment
Steven [Sat, 29 May 2021 14:06:25 +0000 (14:06 +0000)]
Added a comment

5 years agoAdded a comment
frodo [Sat, 29 May 2021 13:51:50 +0000 (13:51 +0000)]
Added a comment

5 years agoAdded a comment
Lukey [Sat, 29 May 2021 13:40:04 +0000 (13:40 +0000)]
Added a comment

5 years ago(no commit message)
frodo [Sat, 29 May 2021 13:27:12 +0000 (13:27 +0000)]

5 years agoAdded a comment
Lukey [Sat, 29 May 2021 12:40:57 +0000 (12:40 +0000)]
Added a comment

5 years agoAdded a comment: Using the --content flag
Steven [Sat, 29 May 2021 00:14:31 +0000 (00:14 +0000)]
Added a comment: Using the --content flag

5 years ago(no commit message)
Steven [Sat, 29 May 2021 00:09:48 +0000 (00:09 +0000)]

5 years agodevblog
Joey Hess [Thu, 27 May 2021 16:45:06 +0000 (12:45 -0400)]
devblog

5 years agoAdded annex.adviceNoSshCaching config.
Joey Hess [Thu, 27 May 2021 16:37:39 +0000 (12:37 -0400)]
Added annex.adviceNoSshCaching config.

Sponsored-by: Brock Spratlen on Patreon
5 years agocomment
Joey Hess [Thu, 27 May 2021 16:23:57 +0000 (12:23 -0400)]
comment

5 years agocomment and reject todo
Joey Hess [Thu, 27 May 2021 16:19:35 +0000 (12:19 -0400)]
comment and reject todo

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 27 May 2021 16:14:29 +0000 (12:14 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agocomment
Joey Hess [Thu, 27 May 2021 16:13:49 +0000 (12:13 -0400)]
comment