Commit graph

40594 commits

Author SHA1 Message Date
Joey Hess
64cac1a721
avoid potentially very long bwlimit delay at start
I first saw this getting with -J2 over ssh, but later saw it also
without the -J2. It was resuming, and the calulated unboundDelay was
many minutes. The first update of the meter jumped to some large value,
because of the resuming, and so it thought the BW was super fast.

Avoid by waiting until the second meter update.

Might be a good idea to also guard for the delay being many seconds
and avoid waiting. But how many? If BW is legitimately super fast, and a
remote happens to read more than a 32kb or so chunk at a time, it could
in theory download megabytes or gigabytes of data before the first meter
update. It would actually be appropriate then to delay for a long time,
if the desired BW was low. Could make up some numbers that are sane now,
but tech may improve.

(BTW, pleased to see bwlimit does work with -J. I had worried that
it might not, if the meter update happened in a different thread than
the downloading, but it's done in the same thread.)

Sponsored-by: Brett Eisenberg on Patreon
2021-09-22 19:23:30 -04:00
Joey Hess
94a9116175
comment 2021-09-22 16:28:06 -04:00
Joey Hess
db2f364359
followup 2021-09-22 15:31:04 -04:00
Joey Hess
e35a94687f
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-22 15:29:52 -04:00
Joey Hess
1033a81d63
mention tiny wart 2021-09-22 15:29:07 -04:00
Joey Hess
fc9abca231
Merge branch 'bwlimit' 2021-09-22 15:27:28 -04:00
Joey Hess
e8496d62e4
improved bwrate limiting implementation
New method is much better. Avoids unrestrained transfer at the beginning
(except for the first block. Keeps right at or a few kb/s below the
configured limit, with very little varation in the actual reported bandwidth.

Removed the /s part of the config as it's not needed.

Ready to merge.

Sponsored-by: Luke Shumaker on Patreon
2021-09-22 15:27:16 -04:00
mih
0f38387d60 Added a comment: Performance stats on crippled Debian NTFS-mount 2021-09-22 18:37:10 +00:00
Joey Hess
00c452f0db
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-22 11:15:51 -04:00
Joey Hess
44d3d50785
note 2021-09-22 11:10:55 -04:00
Joey Hess
798b33ba3d
simplify annex.bwlimit handling
RemoteGitConfig parsing looks for annex.bwlimit when a remote
does not have a per-remote config for it, so no need for a separate
gobal config.

Sponsored-by: Svenne Krap on Patreon
2021-09-22 10:52:01 -04:00
Joey Hess
05a097cde8
Merge branch 'master' into bwlimit 2021-09-22 10:48:27 -04:00
Joey Hess
4fef94d764
simplify annex.stalldetection handling
RemoteGitConfig parsing looks for annex.stalldetection when a remote
does not have a per-remote config for it, so no need for a separate
gobal config.

Sponsored-by: Noam Kremen on Patreon
2021-09-22 10:46:10 -04:00
Joey Hess
55b405a965
fix remote git config vs global git config order
Bug fix: Git configs such as annex.verify were incorrectly overriding
per-remote git configs such as remote.name.annex-verify.

This dates all the way back to 2013,
commit 8a5b397ac4,
where hlint apparently somehow confused me into parsing in the wrong
order. Before that it was correct.

Amazing noone has noticed until now.

Sponsored-by: Kevin Mueller on Patreon
2021-09-22 10:41:56 -04:00
Atemu
f71cffa401 Added a comment 2021-09-22 14:17:59 +00:00
Joey Hess
b76a4453cb
bwlimit branch 2021-09-22 09:54:14 -04:00
Joey Hess
63d508e885
resume properly when copying a file to/from a local git remote is interrupted
Probably this fixes a reversion, but I don't know what version broke it.

This does use withOtherTmp for a temp file that could be quite large.
Though albeit a reflink copy that will not actually take up any space
as long as the file it was copied from still exists. So if the copy cow
succeeds but git-annex is interrupted just before that temp file gets
renamed into the usual .git/annex/tmp/ location, there is a risk that
the other temp directory ends up cluttered with a larger temp file than
later. It will eventually be cleaned up, and the changes of this being
a problem are small, so this seems like an acceptable thing to do.

Sponsored-by: Shae Erisson on Patreon
2021-09-21 17:43:35 -04:00
Joey Hess
18e00500ce
bwlimit
Added annex.bwlimit and remote.name.annex-bwlimit config that works for git
remotes and many but not all special remotes.

This nearly works, at least for a git remote on the same disk. With it set
to 100kb/1s, the meter displays an actual bandwidth of 128 kb/s, with
occasional spikes to 160 kb/s. So it needs to delay just a bit longer...
I'm unsure why.

However, at the beginning a lot of data flows before it determines the
right bandwidth limit. A granularity of less than 1s would probably improve
that.

And, I don't know yet if it makes sense to have it be 100ks/1s rather than
100kb/s. Is there a situation where the user would want a larger
granularity? Does granulatity need to be configurable at all? I only used that
format for the config really in order to reuse an existing parser.

This can't support for external special remotes, or for ones that
themselves shell out to an external command. (Well, it could, but it
would involve pausing and resuming the child process tree, which seems
very hard to implement and very strange besides.) There could also be some
built-in special remotes that it still doesn't work for, due to them not
having a progress meter whose displays blocks the bandwidth using thread.
But I don't think there are actually any that run a separate thread for
downloads than the thread that displays the progress meter.

Sponsored-by: Graham Spencer on Patreon
2021-09-21 16:58:10 -04:00
Joey Hess
c9dd63d67d
comment 2021-09-21 13:45:16 -04:00
Joey Hess
d7374f0629
close as dup 2021-09-21 13:31:42 -04:00
Joey Hess
97439f4233
comment
and reword possibly slightly confusing part of walkthrough
2021-09-21 13:23:57 -04:00
Joey Hess
ffb8af132e
improve docs for refspec format
It was especially unclear that "reflog" did not need a leading "+".
2021-09-21 13:19:57 -04:00
Joey Hess
e17c7bf0cc
response 2021-09-21 11:51:47 -04:00
Joey Hess
72b5c1dca7
comment 2021-09-21 11:30:15 -04:00
Joey Hess
c81e489754
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-21 10:27:53 -04:00
mih
5a1387916e 2021-09-21 09:22:19 +00:00
weinzwang
8b9d2a6641 Added a comment: Should be safe 2021-09-21 07:55:58 +00:00
Joey Hess
9e8f884739
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-20 19:21:00 -04:00
weinzwang
3916e32492 fixed a typo 2021-09-19 21:46:42 +00:00
joshmen
1549d673e8 Added a comment: Same here 2021-09-19 17:03:27 +00:00
weinzwang
9eceb418c4 2021-09-19 16:02:33 +00:00
joshmen
6910cccc0a 2021-09-18 20:10:28 +00:00
gabrielhidasy@c3d26e2c0b3e669d012f06736616088b42ad0dbe
2850fbafac Added a comment: Closing the loop 2021-09-17 23:56:46 +00:00
weinzwang
77eac64cb9 Added a comment 2021-09-17 18:57:41 +00:00
Lukey
98707fb59f Added a comment 2021-09-17 15:24:48 +00:00
davi.castro@13c06889d1a1aef6321227888bd7d6b73d5692ea
b16283c54a 2021-09-16 21:45:17 +00:00
weinzwang
dfd8ef590f Added a comment 2021-09-16 20:56:30 +00:00
Lukey
12f5cb41c5 Added a comment 2021-09-16 15:00:49 +00:00
Joey Hess
da6f3fd6c3
Merge branch 'master' of ssh://git-annex.branchable.com 2021-09-16 09:27:58 -04:00
weinzwang
f7f2ad3eb6 2021-09-15 15:29:59 +00:00
Joey Hess
b8130655cc
comment 2021-09-11 17:01:39 -04:00
mike@2d6d71f56ce2a992244350475251df87c26fe351
2a0633f445 Added a comment 2021-09-10 14:41:17 +00:00
mike@2d6d71f56ce2a992244350475251df87c26fe351
3ec365abbc Added a comment 2021-09-10 14:28:23 +00:00
mike@2d6d71f56ce2a992244350475251df87c26fe351
cd54a8c916 2021-09-10 13:57:53 +00:00
mike@2d6d71f56ce2a992244350475251df87c26fe351
6f9181df12 2021-09-10 13:56:58 +00:00
Joey Hess
853babc596
response and close 2021-09-08 12:12:11 -04:00
Joey Hess
2d016db3a8
Merge remote-tracking branch 'origin/master' 2021-09-08 11:56:27 -04:00
Joey Hess
2739adc258
fix build with ghc 9.0.1
I was not able to test the whole build because of a very strange
Prelude.chr: bad argument: 469762054
Which I assume is a problem with this version of ghc or the way I was
using stack.

The stack.yaml that builds it used this patch

diff --git a/stack.yaml b/stack.yaml
index 790bffff2..8bcbaa0ec 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -1,6 +1,6 @@
 flags:
   git-annex:
-    production: true
+    production: false
     assistant: true
     pairing: true
     torrentparser: true
@@ -18,13 +18,15 @@ extra-deps:
 - IfElse-0.85
 - aws-0.22
 - bloomfilter-2.0.1.0
-- filepath-bytestring-1.4.2.1.6
-- git-lfs-1.1.0
-- http-client-restricted-0.0.3
+- filepath-bytestring-1.4.2.1.8
+- git-lfs-1.1.1
+- http-client-restricted-0.0.4
 - network-multicast-0.3.2
 - sandi-0.5
 - torrent-10000.1.1
 - bencode-0.6.1.1
+- base16-bytestring-0.1.1.7
+- base64-bytestring-1.0.0.3
 explicit-setup-deps:
   git-annex: true
-resolver: lts-16.27
+resolver: nightly-2021-09-07
2021-09-07 16:53:07 -04:00
anarcat
478d7aa937 some weird corner case that might be handled a little better? 2021-09-07 14:25:38 +00:00
Joey Hess
ed789059b0
comment 2021-09-06 15:52:10 -04:00