Commit graph

41038 commits

Author SHA1 Message Date
Joey Hess
8b3238cf42
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-14 13:27:11 -04:00
Joey Hess
c2e46f4707
improve git command queue flushing with time limit
So that eg, addurl of several large files that take time to download will
update the index for each file, rather than deferring the index updates to
the end.

In cases like an add of many smallish files, where a new file is being
added every few seconds. In that case, the queue will still build up a
lot of changes which are flushed at once, for best performance. Since
the default queue size is 10240, often it only gets flushed once at the
end, same as before. (Notice that updateQueue updated _lastchanged
when adding a new item to the queue without flushing it; that is
necessary to avoid it flushing the queue every 5 minutes in this case.)

But, when it takes more than a 5 minutes to add a file, the overhead of
updating the index immediately is probably small, so do it after each
file. This avoids git-annex potentially taking a very very long time
indeed to stage newly added files, which can be annoying to the user who
would like to get on with doing something with the files it's already
added, eg using git mv to rename them to a better name.

This is only likely to cause a problem if it takes say, 30 seconds to
update the index; doing an extra 30 seconds of work after every 5
minute file add would be less optimal. Normally, updating the index takes
significantly less time than that. On a SSD with 100k files it takes
less than 1 second, and the index write time is bound by disk read and
write so is not too much worse on a hard drive. So I hope this will not
impact users, although if it does turn out to, the time limit could be
made configurable.

A perhaps better way to do it would be to have a background worker
thread that wakes up every 60 seconds or so and flushes the queue.
That is made somewhat difficult because the queue can contain Annex
actions and so this would add a new source of concurrency issues.
So I'm trying to avoid that approach if possible.

Sponsored-by: Erik Bjäreholt on Patreon
2021-12-14 12:23:19 -04:00
manishofyore@b68d21cd485417e84ea87876a9064f82714a08a1
0ba973463f Added a comment 2021-12-13 23:12:53 +00:00
Joey Hess
fe31951e5e
close 2021-12-13 13:13:54 -04:00
Joey Hess
22e805b9f2
clarify 2021-12-13 12:48:45 -04:00
Joey Hess
ca99d43a2a
comment 2021-12-13 12:47:52 -04:00
Joey Hess
50cfc4e71f
comment 2021-12-13 12:46:47 -04:00
Joey Hess
3e199a558d
comment 2021-12-13 12:38:27 -04:00
jasonb@ab4484d9961a46440958fa1a528e0fc435599057
14823f485d Added a comment 2021-12-12 02:49:28 +00:00
tomdhunt
bed2c784ae 2021-12-10 19:26:28 +00:00
tomdhunt
d64feaae26 2021-12-10 19:07:46 +00:00
yarikoptic
74f8ba7813 Added a comment 2021-12-09 21:45:29 +00:00
io42630
9b3984d5e3 rename forum/__91__Question__93___Mixing_.thin_and_.fat_repos__63__.mdwn to forum/__91__Question__93___Mixing_.thin_and_default_repos__63__.mdwn 2021-12-09 21:05:46 +00:00
io42630
cb75782431 2021-12-09 21:02:28 +00:00
io42630
ff189fe837 2021-12-09 21:01:05 +00:00
Joey Hess
b1ad888a9f
moreinfo, sigh 2021-12-09 15:43:14 -04:00
Joey Hess
c8d0eec638
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-09 15:28:29 -04:00
Joey Hess
6242b35c33
fix error message
Was "failed to generate a key" when key generation did not fail
(it never does anymore) but the actual problem was it failed to stat
the source file, perhaps due to it being deleted while the key was being
generated.

A user reported this, in a comment I followed up on in
262400fe04, although I don't know
what they did to trigger the error message.
2021-12-09 15:25:59 -04:00
yarikoptic
3899ff3cf1 Added a comment 2021-12-09 19:10:57 +00:00
Joey Hess
262400fe04
comment 2021-12-09 15:07:34 -04:00
Joey Hess
130427fa09
comment 2021-12-09 15:01:54 -04:00
Joey Hess
3d7b5f442a
comment 2021-12-09 14:59:36 -04:00
Joey Hess
b69f354a87
comment 2021-12-09 14:43:10 -04:00
Joey Hess
dbba231e06
Improve error message display when autoinit fails
Due to eg, a permissions problem.
2021-12-09 14:38:12 -04:00
Joey Hess
a62f2e141b
convert some error to giveup
error has a backtrace, but these are non-internal errors, so a backtrace
is unlikely to be useful
2021-12-09 14:36:54 -04:00
Joey Hess
ab3c13c021
comment 2021-12-09 13:57:25 -04:00
Joey Hess
975ddae967
comment 2021-12-09 13:51:03 -04:00
Joey Hess
61b48b69ba
fix build on windows 2021-12-09 13:39:16 -04:00
Joey Hess
5f1f6d0cec
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-09 13:38:32 -04:00
yarikoptic
68e8ed5acb add more lines for more informative extract 2021-12-09 16:32:03 +00:00
yarikoptic
918b28b6dc Initial report details from Manish on Windows 2021-12-09 16:30:44 +00:00
jasonb@ab4484d9961a46440958fa1a528e0fc435599057
f1516579ce Added a comment 2021-12-09 16:20:48 +00:00
jwodder
4b0af2f27b 2021-12-09 14:13:54 +00:00
Joey Hess
2a5f0d70e2
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-09 09:52:29 -04:00
Joey Hess
bba74a2b84
improve comments 2021-12-08 18:59:22 -04:00
alt
7eef6ac703 Added a comment 2021-12-08 20:01:33 +00:00
Joey Hess
4a1758fccf
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-08 15:38:23 -04:00
Joey Hess
b865ae6b38
comment 2021-12-08 15:20:36 -04:00
Joey Hess
4b19626a36
Fix build with ghc 9.0.1
Continuing along the same lines as commit
2739adc258, it seems that
while Remote -> Retriever expands to the same data type this changes
it to, ghc 9.0.1 refuses to consider them equiviant. I guess it has
something to do with the forall?

The rest of the build all succeeds, although the stack build then crashes:
Linking .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.4.0.0/build/git-annex/git-annex ...
Completed 233 action(s).
Prelude.chr: bad argument: 2214592520
This issue seems likely to be about it:
https://github.com/commercialhaskell/stack/pull/5508
I'm building with stack from debian, version 2.3.3, so a newer stack
probably avoids that. Anyway, despite that stack problem,
the git-annex binary is built, and works.

The stack.yaml I used for this build was patched as follows:

diff --git a/stack.yaml b/stack.yaml
index 8dac87c15..62c4b5b9d 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,6 +1,6 @@
 flags:
   git-annex:
-    production: true
+    production: false
     assistant: true
     pairing: true
     torrentparser: true
@@ -14,7 +14,7 @@ flags:
     httpclientrestricted: true
 packages:
 - '.'
-resolver: lts-18.13
+resolver: nightly-2021-09-07
 extra-deps:
 - IfElse-0.85
 - aws-0.22

Sponsored-by: Graham Spencer on Patreon
2021-12-08 15:08:02 -04:00
yarikoptic
d56267f0cc Added a comment 2021-12-08 18:56:51 +00:00
yarikoptic
c5a415191d initial report on crash on readonly non-inited annex 2021-12-08 18:56:14 +00:00
Joey Hess
0139b4fa82
comment 2021-12-08 13:42:36 -04:00
Joey Hess
b060d99fe0
comment 2021-12-08 13:18:13 -04:00
Joey Hess
b8f4f2fb89
comment 2021-12-08 12:47:34 -04:00
jasonb@ab4484d9961a46440958fa1a528e0fc435599057
d45e4ea685 Added a comment 2021-12-08 16:25:32 +00:00
jasonb@ab4484d9961a46440958fa1a528e0fc435599057
2eeb379e4d Added a comment 2021-12-08 00:46:40 +00:00
yarikoptic
2719170575 initial todo on more flexible credentials management mechanism 2021-12-07 18:34:58 +00:00
Joey Hess
a7a5915cda
comment 2021-12-07 13:03:45 -04:00
Joey Hess
af236a7c6f
Merge branch 'master' of ssh://git-annex.branchable.com 2021-12-07 13:00:47 -04:00
Joey Hess
58460ac3e4
comment 2021-12-07 13:00:28 -04:00