git-annex.git
5 years agoAdded a comment: setting up sync
Ilya_Shlyakhter [Fri, 18 Jun 2021 18:55:00 +0000 (18:55 +0000)]
Added a comment: setting up sync

5 years agoAdded a comment
kinshukkashyap.me@35751535d5ebba69df2f2ead4f868251d1aadacf [Fri, 18 Jun 2021 15:11:23 +0000 (15:11 +0000)]
Added a comment

5 years agoAdded a comment
Lukey [Fri, 18 Jun 2021 14:50:45 +0000 (14:50 +0000)]
Added a comment

5 years ago(no commit message)
Kinshuk [Fri, 18 Jun 2021 14:10:42 +0000 (14:10 +0000)]

5 years ago(no commit message)
Kinshuk [Fri, 18 Jun 2021 14:07:55 +0000 (14:07 +0000)]

5 years agoAdded a comment
james@06209b7878fcf3b5c46b8028dacb3cec6609369c [Thu, 17 Jun 2021 18:14:45 +0000 (18:14 +0000)]
Added a comment

5 years agoAdded a comment
yarikoptic [Wed, 16 Jun 2021 21:32:58 +0000 (21:32 +0000)]
Added a comment

5 years agoadded suggestion to allow use of synchronous=OFF with Sqlite
Ilya_Shlyakhter [Wed, 16 Jun 2021 20:06:39 +0000 (20:06 +0000)]
added suggestion to allow use of synchronous=OFF with Sqlite

5 years agoAdded a comment: thanks
Ilya_Shlyakhter [Wed, 16 Jun 2021 19:54:02 +0000 (19:54 +0000)]
Added a comment: thanks

5 years agocomment
Joey Hess [Wed, 16 Jun 2021 16:07:08 +0000 (12:07 -0400)]
comment

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

5 years agoAdded a comment: adding disableremote
Oumaima [Wed, 16 Jun 2021 07:37:24 +0000 (07:37 +0000)]
Added a comment: adding disableremote

5 years agoremoved
Oumaima [Wed, 16 Jun 2021 07:36:54 +0000 (07:36 +0000)]
removed

5 years agoAdded a comment: adding disableremote
Oumaima [Wed, 16 Jun 2021 07:36:16 +0000 (07:36 +0000)]
Added a comment: adding disableremote

5 years agoclear progress bar before displaying messages
Joey Hess [Wed, 16 Jun 2021 00:43:00 +0000 (20:43 -0400)]
clear progress bar before displaying messages

In particular this clears it before "transfer stalled". If an external
special remote uses showInfo while progress is displayed, it will also
improve display of that.

Generally this will avoid all such problems in the future..

Sponsored-by: Svenne Krap on Patreon
5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 15 Jun 2021 15:46:04 +0000 (11:46 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoremoved
yarikoptic [Tue, 15 Jun 2021 15:38:47 +0000 (15:38 +0000)]
removed

5 years agodrop, move, mirror: when two files have the same content, honor the max numcopies...
Joey Hess [Tue, 15 Jun 2021 15:38:44 +0000 (11:38 -0400)]
drop, move, mirror: when two files have the same content, honor the max numcopies and requiredcopies

Eg, before with a .gitattributes like:

*.2 annex.numcopies=2
*.1 annex.numcopies=1

And foo.1 and foo.2 having the same content and key, git-annex drop foo.1 foo.2
would succeed, leaving just 1 copy, despite foo.2 needing 2 copies.
It dropped foo.1 first and then skipped foo.2 since its content was gone.

Now that the keys database includes locked files, this longstanding wart
can be fixed.

Sponsored-by: Noam Kremen on Patreon
5 years agoAdded a comment
yarikoptic [Tue, 15 Jun 2021 15:38:28 +0000 (15:38 +0000)]
Added a comment

5 years agoAdded a comment
yarikoptic [Tue, 15 Jun 2021 15:38:16 +0000 (15:38 +0000)]
Added a comment

5 years agoremove unused import
Joey Hess [Tue, 15 Jun 2021 15:31:42 +0000 (11:31 -0400)]
remove unused import

5 years agoverify associated files when checking numcopies
Joey Hess [Tue, 15 Jun 2021 15:12:27 +0000 (11:12 -0400)]
verify associated files when checking numcopies

Most of this is just refactoring. But, handleDropsFrom
did not verify that associated files from the keys db were still
accurate, and has now been fixed to.

A minor improvement to this would be to avoid calling catKeyFile
twice on the same file, when getting the numcopies and mincopies value,
in the common case where the same file has the highest value for both.
But, it avoids checking every associated file, so it will scale well to
lots of dups already.

Sponsored-by: Kevin Mueller on Patreon
5 years agofix build
Joey Hess [Tue, 15 Jun 2021 15:13:31 +0000 (11:13 -0400)]
fix build

5 years agoavoid warning
Joey Hess [Tue, 15 Jun 2021 15:11:55 +0000 (11:11 -0400)]
avoid warning

5 years agoavoid nub
Joey Hess [Tue, 15 Jun 2021 14:48:11 +0000 (10:48 -0400)]
avoid nub

It's O(N^2) which could matter when there are many dup files using the
same key.

5 years agorefactor
Joey Hess [Tue, 15 Jun 2021 14:27:33 +0000 (10:27 -0400)]
refactor

5 years agoclose
Joey Hess [Tue, 15 Jun 2021 14:11:14 +0000 (10:11 -0400)]
close

5 years agorespinse
Joey Hess [Tue, 15 Jun 2021 14:02:41 +0000 (10:02 -0400)]
respinse

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

5 years agofix exponential blowup when adding lots of identical files
Joey Hess [Tue, 15 Jun 2021 13:32:12 +0000 (09:32 -0400)]
fix exponential blowup when adding lots of identical files

This was an old problem when the files were being added unlocked,
so the changelog mentions that being fixed. However, recently it's also
affected locked files.

The fix for locked files is kind of stupidly simple. moveAnnex already
handles populating unlocked files, and only does it when the object file
was not already present. So remove the redundant populateUnlockedFiles
call. (That call was added all the way back in
cfaac52b88e157dd4e71626fe68af37015b9c9bd, and has always been
unncessary.)

Sponsored-by: Dartmouth College's Datalad project
5 years agoremove supportUnlocked check that is not worth its overhead
Joey Hess [Tue, 15 Jun 2021 13:24:59 +0000 (09:24 -0400)]
remove supportUnlocked check that is not worth its overhead

moveAnnex only gets to that check if the object file was not present
before. So in the case where dup files are being added repeatedly,
it will only run the first time, and so there's no significant speedup
from doing it; all it avoids is a single sqlite lookup. Since MVar
accesses do have overhead, it's better to optimise for the common case,
where unlocked files are supported.

removeAnnex is less clear cut, but I think mostly is skipped running on
keys when the object has already been dropped, so similar reasoning
applies.

5 years ago(no commit message)
9qf@758d7b174d81a134727acab9db0168c8f0782b3a [Tue, 15 Jun 2021 12:21:19 +0000 (12:21 +0000)]

5 years agobloom doesn't work, but this should I hope
Joey Hess [Mon, 14 Jun 2021 21:53:01 +0000 (17:53 -0400)]
bloom doesn't work, but this should I hope

5 years agoplan
Joey Hess [Mon, 14 Jun 2021 21:13:37 +0000 (17:13 -0400)]
plan

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

5 years agogoing round and round, boredly
Joey Hess [Mon, 14 Jun 2021 18:37:06 +0000 (14:37 -0400)]
going round and round, boredly

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

5 years agocomment
Joey Hess [Mon, 14 Jun 2021 18:34:22 +0000 (14:34 -0400)]
comment

5 years agocomment
Joey Hess [Mon, 14 Jun 2021 18:32:38 +0000 (14:32 -0400)]
comment

5 years agoFuture proof activity log parsing
Joey Hess [Mon, 14 Jun 2021 18:18:06 +0000 (14:18 -0400)]
Future proof activity log parsing

When the log has an activity that is not known, eg added by a future
version of git-annex, it used to be treated as no activity at all,
which would make git-annex expire think it should expire the repository,
despite it having some kind of recent activity.

Hopefully there will be no reason to add a new activity until enough
time has passed that this commit is in use everywhere.

Sponsored-by: Jake Vosloo on Patreon
5 years agoAdded a comment
yarikoptic [Mon, 14 Jun 2021 17:36:16 +0000 (17:36 +0000)]
Added a comment

5 years ago(no commit message)
james@06209b7878fcf3b5c46b8028dacb3cec6609369c [Mon, 14 Jun 2021 17:19:50 +0000 (17:19 +0000)]

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

5 years agoimprove docs based on forum feedback
Joey Hess [Mon, 14 Jun 2021 17:04:58 +0000 (13:04 -0400)]
improve docs based on forum feedback

5 years agocomment
Joey Hess [Mon, 14 Jun 2021 16:56:29 +0000 (12:56 -0400)]
comment

5 years agofix windows build
Joey Hess [Mon, 14 Jun 2021 16:43:26 +0000 (12:43 -0400)]
fix windows build

5 years agocomment
Joey Hess [Mon, 14 Jun 2021 16:42:11 +0000 (12:42 -0400)]
comment

5 years agoavoid sometimes expensive operations when annex.supportunlocked = false
Joey Hess [Mon, 14 Jun 2021 16:36:55 +0000 (12:36 -0400)]
avoid sometimes expensive operations when annex.supportunlocked = false

This will mostly just avoid a DB lookup, so things get marginally
faster. But in cases where there are many files using the same key, it
can be a more significant speedup.

Added overhead is one MVar lookup per call, which should be small
enough, since this happens after transferring or ingesting a file,
which is always a lot more work than that. It would be nice, though,
to move getGitConfig to AnnexRead, which there is an open todo about.

5 years agoresponse
Joey Hess [Mon, 14 Jun 2021 16:36:42 +0000 (12:36 -0400)]
response

5 years agoAdded a comment
yarikoptic [Mon, 14 Jun 2021 16:23:41 +0000 (16:23 +0000)]
Added a comment

5 years agoAdded a comment: git-annex-add slowdown
Ilya_Shlyakhter [Mon, 14 Jun 2021 16:00:44 +0000 (16:00 +0000)]
Added a comment: git-annex-add slowdown

5 years agocheck symlink before reading file
Joey Hess [Mon, 14 Jun 2021 15:53:51 +0000 (11:53 -0400)]
check symlink before reading file

This is faster because when multiple files are in a directory, it gets
cached.

5 years agoretitle
Joey Hess [Mon, 14 Jun 2021 15:44:55 +0000 (11:44 -0400)]
retitle

5 years agoreproduced
Joey Hess [Mon, 14 Jun 2021 15:37:21 +0000 (11:37 -0400)]
reproduced

5 years agohandle edge case of symlink to something that is not really a pointer file
Joey Hess [Mon, 14 Jun 2021 15:29:49 +0000 (11:29 -0400)]
handle edge case of symlink to something that is not really a pointer file

That seems very unlikely to happen, but still, it's possible it could.
And with the recent addition of locked files to the keys db, this could
be called by places that did not call it before, so it seems even more
important it's correct.

Adds an extra stat of the file, and is potentially racy, but both
problems are fixed by the unix-2.8.0 path. I have not tested that path
builds because that package is not yet released and it would be difficult
to install it since it's tightly tied to a ghc version.

5 years agorename for clarity
Joey Hess [Mon, 14 Jun 2021 14:55:24 +0000 (10:55 -0400)]
rename for clarity

Associated files are recorded now also for locked files, but this is
only needed to populate unlocked files.

5 years agoAdded a comment
yarikoptic [Wed, 9 Jun 2021 22:28:06 +0000 (22:28 +0000)]
Added a comment

5 years agoAdded a comment: more "mystery resolved" -- identical (empty) keys
yarikoptic [Wed, 9 Jun 2021 21:00:34 +0000 (21:00 +0000)]
Added a comment: more "mystery resolved" -- identical (empty) keys

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 9 Jun 2021 19:38:58 +0000 (15:38 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agocomment
Joey Hess [Wed, 9 Jun 2021 19:38:55 +0000 (15:38 -0400)]
comment

5 years agoAdded a comment
yarikoptic [Tue, 8 Jun 2021 22:02:34 +0000 (22:02 +0000)]
Added a comment

5 years agoAdded a comment
yarikoptic [Tue, 8 Jun 2021 21:58:20 +0000 (21:58 +0000)]
Added a comment

5 years agoAdded a comment: OSX mystery resolved. add --batch is effective mitigation
yarikoptic [Tue, 8 Jun 2021 21:56:53 +0000 (21:56 +0000)]
Added a comment: OSX mystery resolved. add --batch is effective mitigation

5 years agocomments
Joey Hess [Tue, 8 Jun 2021 21:38:56 +0000 (17:38 -0400)]
comments

5 years agoAdded a comment
yarikoptic [Tue, 8 Jun 2021 20:23:09 +0000 (20:23 +0000)]
Added a comment

5 years agoAdded a comment: getting closer...
yarikoptic [Tue, 8 Jun 2021 19:21:59 +0000 (19:21 +0000)]
Added a comment: getting closer...

5 years agoAdded a comment
Ilya_Shlyakhter [Tue, 8 Jun 2021 19:08:01 +0000 (19:08 +0000)]
Added a comment

5 years ago(no commit message)
jenkin.schibel@286264d9ceb79998aecff0d5d1a4ffe34f8b8421 [Tue, 8 Jun 2021 18:40:09 +0000 (18:40 +0000)]

5 years agoremoved
jenkin.schibel@286264d9ceb79998aecff0d5d1a4ffe34f8b8421 [Tue, 8 Jun 2021 18:26:30 +0000 (18:26 +0000)]
removed

5 years agoMerge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 8 Jun 2021 16:52:08 +0000 (12:52 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com

5 years agoAdded a comment: all recent builds/logs are fetched to smaug
yarikoptic [Tue, 8 Jun 2021 16:50:12 +0000 (16:50 +0000)]
Added a comment: all recent builds/logs are fetched to smaug

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