Commit graph

36877 commits

Author SHA1 Message Date
Joey Hess
cee6b344b4
cat-file resource pool
Avoid running a large number of git cat-file child processes when run with
a large -J value.

This implementation takes care to avoid adding any overhead to git-annex
when run without -J. When run with -J, there is a small bit of added
overhead, to manipulate the resource pool. That optimisation added a
fair bit of complexity.
2020-04-20 15:19:31 -04:00
Joey Hess
87b7b0f202
comment 2020-04-20 12:06:14 -04:00
Joey Hess
5446379cd9
Merge branch 'master' of ssh://git-annex.branchable.com 2020-04-20 10:03:38 -04:00
thk
ffeef75917 2020-04-19 08:15:47 +00:00
Joey Hess
1b2dd74d8d
bug 2020-04-18 23:57:48 -04:00
yarikoptic
6c9c974e55 Added a comment 2020-04-18 02:14:32 +00:00
yarikoptic
67f0407477 Added a comment 2020-04-18 02:05:52 +00:00
Joey Hess
b480ce01f7
Merge branch 'master' of ssh://git-annex.branchable.com 2020-04-17 17:47:59 -04:00
Joey Hess
2da760fcae
comment 2020-04-17 17:32:49 -04:00
Joey Hess
529f488ec4
fix a thundering herd problem
Avoid repeatedly opening keys db when accessing a local git remote and -J
is used.

What was happening was that Remote.Git.onLocal created a new annex state
as each thread started up. The way the MVar was used did not prevent that.
And that, in turn, led to repeated opening of the keys db, as well as
probably other extra work or resource use.

Also managed to get rid of Annex.remoteannexstate, and it turned out there
was an unncessary Maybe in the keysdbhandle, since the handle starts out
closed.
2020-04-17 17:09:29 -04:00
yarikoptic
a2b2708ab6 Added a comment: quick follow up 2020-04-17 20:34:55 +00:00
Joey Hess
fada5c120c
remove unused import 2020-04-17 15:19:49 -04:00
Joey Hess
fe9cf1256e
move remoteList into dupState
This does mean that RemoteDaemon.Transport.Tor's call runs it, otherwise
no change, but this is groundwork for doing more such expensive actions
in dupState.
2020-04-17 14:36:45 -04:00
Joey Hess
988317634b
comment 2020-04-17 14:11:17 -04:00
Joey Hess
6c39ec9b27
comment 2020-04-17 12:37:28 -04:00
Dan
b325dfea4d Added a comment: find wanted on remote? 2020-04-16 21:19:44 +00:00
yarikoptic
5dc513ccdb Added a comment 2020-04-16 03:43:13 +00:00
yarikoptic
1705d3657e Added a comment: it is many more "open files" in reality 2020-04-16 03:41:07 +00:00
Joey Hess
a7840c0e04
improve programPath
Fixes a failure mode where git-annex sync would try to run git-annex and
complain that it failed to find it in ~/.config/git-annex/program or PATH,
when there was a git-annex in /usr/bin/, but the original one was run
from elsewhere (eg, ~/bin) and happened not to be present any longer.

Now, it will fall back to using git-annex from PATH in such a case.
Which might fail due to some version incompatability, but still better
than a misleading error message.

Also made readProgramFile only read the file, not look for git-annex in
PATH as a fallback. That fallback may have confused Assistant.Upgrade,
which really wants the value from the file.
2020-04-15 16:46:34 -04:00
Joey Hess
957a87b437
fix absolute filenames fed into --batch and git-annex info 2020-04-15 16:04:05 -04:00
Joey Hess
a14168a321
reproduced 2020-04-15 15:06:53 -04:00
Joey Hess
503abb6d54
remove warning about git gc for annex.alwayscommit=false
I doubt that warning has ever been right, but I'm sure it is not right
now.

For there to be a risk of git gc deleting objects that are in the annex
index, journal files would have to be staged into it, and deleted, but
the index not committed to the git-annex branch. And AFAICS, there is no
code path where that actually happens. I considered adding one recently,
but didn't.

The way it actually works is, as long as the user has annex.alwayscommit=false
the data lives in the journal, where it's safe from git gc. Then when
git-annex is run w/o that config, the journal is staged into the index,
which is immediately committed to the branch. There's no window where
git gc could delete the objects, because git gc only deletes objects
after some time (2 weeks by default).

Now, if git-annex gets suspended at just the wrong time, or interrupted,
then yes, it's possible. But doesn't matter whether that config was ever
set or not. And many uses of git-annex also recover from that situation
by committing to the git-annex branch.
2020-04-15 14:25:33 -04:00
Joey Hess
ddadc0c1aa
Merge branch 'master' of ssh://git-annex.branchable.com 2020-04-15 14:20:06 -04:00
Joey Hess
891e9a81eb
close bug that was apparently fixed satisfactorally 2020-04-15 14:17:21 -04:00
Joey Hess
a2fed82267
close 2020-04-15 14:15:41 -04:00
Joey Hess
7ef030b576
close old bug since git-annex no longer uses rsync like it used to 2020-04-15 14:08:48 -04:00
kyle
1a040e0c0a Added a comment 2020-04-15 18:02:29 +00:00
Joey Hess
f85ca7dc80
fix all remaining -Wincomplete-uni-patterns warnings
A couple of these were probably actual bugs in edge cases. Most of the
changes I'm fine with. The fact that aeson's object returns sometihng
that we know will be an Object, but the type checker does not know is
kind of annoying.
2020-04-15 13:55:08 -04:00
Joey Hess
43a9808292
disable journal read optimisation when alwayscommit=false
The journal read optimisation in aeca7c220 later got fixed in eedd73b84
to stage and commit any files that were left in the journal by a
previous git-annex run. That's necessary for the optimisation to work
correctly. But it also meant that alwayscommit=false started committing
the previous git-annex processes journalled changes, which defeated the
purpose of the config setting entirely.

So, disable the optimisation when alwayscommit=false, leaving the
files in the journal and not committing them. See my comments on the bug
report for why this seemed the best approach.

Also fixes a problem when annex.merge-annex-branches=false and there
are changes in the journal. That config indirectly prevents committing
the journal. (Which seems a bit odd given its name, but it always has..)
So, when there were changes in the journal, perhaps left there due to
alwayscommit=false being set before, the optimisation would prevent
git-annex from reading the journal files, and it would operate with out
of date information.
2020-04-15 13:24:33 -04:00
Joey Hess
0e4c92503e
fix warning
I don't think the NoConfigValue case ever actually occurs here.
2020-04-15 13:04:00 -04:00
Joey Hess
9f17242f29
comment 2020-04-15 12:48:55 -04:00
Joey Hess
8ac44498d6
comment 2020-04-15 12:43:22 -04:00
Joey Hess
1aa7082c9a
better response 2020-04-15 12:17:57 -04:00
Joey Hess
b241f579c0
hm 2020-04-15 12:14:39 -04:00
Joey Hess
f4d5ec1457
correction 2020-04-15 12:12:11 -04:00
Joey Hess
520ddf1c75
comment 2020-04-15 12:10:51 -04:00
Christoph.Schmidpeter@d3e5d124c7d5459315c2a9f983ab9a70b88e1d03
95b505c22f 2020-04-15 13:06:14 +00:00
Christoph.Schmidpeter@d3e5d124c7d5459315c2a9f983ab9a70b88e1d03
98c1047a29 removed 2020-04-15 13:00:12 +00:00
Christoph.Schmidpeter@d3e5d124c7d5459315c2a9f983ab9a70b88e1d03
c510e83001 Added a comment: Problems with Assistant and Android 2020-04-15 12:59:44 +00:00
Christoph.Schmidpeter@d3e5d124c7d5459315c2a9f983ab9a70b88e1d03
98fac2be0e 2020-04-15 12:59:04 +00:00
Christoph.Schmidpeter@d3e5d124c7d5459315c2a9f983ab9a70b88e1d03
61ba4d6387 2020-04-15 12:09:08 +00:00
kyle
b11931a4aa bug: alwayscommit=false creating commits 2020-04-14 22:43:34 +00:00
erewhon
92c1d0863b Added a comment 2020-04-14 21:45:35 +00:00
erewhon
5d1495ee0f removed 2020-04-14 21:30:38 +00:00
erewhon
40a3545149 Added a comment 2020-04-14 21:20:51 +00:00
erewhon
a9f7770cde removed 2020-04-14 21:19:46 +00:00
erewhon
6add91fefd Added a comment 2020-04-14 21:18:23 +00:00
Joey Hess
ba6f46c113
--auto doc wording
try to make more clear that --auto is not --all
2020-04-13 16:12:48 -04:00
Joey Hess
09d202ab88
Merge branch 'master' of ssh://git-annex.branchable.com 2020-04-13 16:08:21 -04:00
Joey Hess
bcc0ec5b99
fix runtime crash on incomplete pattern match in lambda
This was very susprising to me that it was not caught by -Wall, so I
enabled -Wincomplete-uni-patterns to catch such things. It found a
second one just lines above, but no others anywhere.
2020-04-13 16:03:21 -04:00