Commit graph

7909 commits

Author SHA1 Message Date
ilovezfs
f3ba40cd43 Added a comment 2017-10-19 05:50:13 +00:00
Joey Hess
e1ac299ad0
better dup key with -J fix
This avoids all the complication about redundant work discussed in
the previous try at fixing this. At the expense of needing each command
that could have the problem to be patched to simply wrap the action in
onlyActionOn once the key is known. But there do not seem to be many
such commands.

onlyActionOn' should not be used with a CommandStart (or CommandPerform),
although the types do allow it. onlyActionOn handles running the whole
CommandStart chain. I couldn't immediately see a way to avoid mistken
use of onlyActionOn'.

This commit was supported by the NSF-funded DataLad project.
2017-10-17 18:48:53 -04:00
Joey Hess
68a49adcda
Improve behavior when -J transfers multiple files that point to the same key
After a false start, I found a fairly non-intrusive way to deal with it.
Although it only handles transfers -- there may be issues with eg
concurrent dropping of the same key, or other operations.

There is no added overhead when -J is not used, other than an added
inAnnex check. When -J is used, it has to maintain and check a small
Set, which should be negligible overhead.

It could output some message saying that the transfer is being done by
another thread. Or it could even display the same progress info for both
files that are being downloaded since they have the same content. But I
opted to keep it simple, since this is rather an edge case, so it just
doesn't say anything about the transfer of the file until the other
thread finishes.

Since the deferred transfer action still runs, actions that do more than
transfer content will still get a chance to do their other work. (An
example of something that needs to do such other work is P2P.Annex,
where the download always needs to receive the content from the peer.)
And, if the first thread fails to complete a transfer, the second thread
can resume it.

But, this unfortunately means that there's a risk of redundant work
being done to transfer a key that just got transferred.
That's not ideal, but should never cause breakage; the same
thing can occur when running two separate git-annex processes.

The get/move/copy/mirror --from commands had extra inAnnex checks added,
inside the download actions. Without those checks, the first thread
downloaded the content, and then the second thread woke up and
downloaded the same content redundantly.

move/copy/mirror --to is left doing redundant uploads for now. It
would need a second checkPresent of the remote inside the upload
to avoid them, which would be expensive. A better way to avoid
redundant work needs to be found..

This commit was supported by the NSF-funded DataLad project.
2017-10-17 17:10:50 -04:00
Joey Hess
9606f6e83a
idea 2017-10-17 13:39:02 -04:00
Joey Hess
0c7fee832a
close bug 2017-10-16 14:50:30 -04:00
Joey Hess
bfb44298fb
close bug 2017-10-16 14:13:08 -04:00
Joey Hess
85ed38a574
Avoid repeated checking that files passed on the command line exist.
git annex add, git annex lock etc make multiple seek passes,
and each seek pass checked that files existed. That was unncessary
redundant work.

Fixed by adding a new WorkTreeItem type, make seek actions use it,
and check that the files exist when constructing it.

This commit was supported by the NSF-funded DataLad project.
2017-10-16 14:10:20 -04:00
Joey Hess
a461cf2ce6
add: Replace work tree file atomically.
Before, there was a window where interrupting an add could result in the
file being moved into the annex, with no symlink yet created.

This commit was supported by the NSF-funded DataLad project.
2017-10-16 12:57:28 -04:00
madalu
c525644567 Added a comment 2017-10-12 00:58:04 +00:00
Joey Hess
c01ecc2ec1
followup 2017-10-11 12:12:35 -04:00
Joey Hess
adcc73d91a
Merge branch 'master' of ssh://git-annex.branchable.com 2017-10-11 11:13:43 -04:00
Joey Hess
4cdf257781
comment 2017-10-11 11:12:58 -04:00
Joey Hess
9aaf7e2b52
webdav: Avoid unncessisarily creating the collection at the top of the repo
when storing files there, since that collection is created by initremote.
(This seems to work around some brokenness of the box.com webdav server
which was entering a redirect loop.)

Note that the fix makes locationParent return Nothing instead of "."
when there's no parent directory between the path and the top of the webdav
repo.

This commit was sponsored by André Pereira on Patreon.
2017-10-11 11:10:33 -04:00
Joey Hess
61dccecad7
Fix build with aws-0.17.
This commit was sponsored by Denis Dzyubenko on Patreon.
2017-10-11 10:57:20 -04:00
Joey Hess
16fde7d4a6
close 2017-10-11 10:48:23 -04:00
yarikoptic
57d9b76a87 Added a comment 2017-10-10 17:56:47 +00:00
yarikoptic
fe11aaf059 Added a comment 2017-10-10 17:40:08 +00:00
Joey Hess
05bd13187d
response 2017-10-10 13:37:46 -04:00
yarikoptic
fe854fbd41 Added a comment: annex fsck reverts them back to incorrect! 2017-10-10 17:17:12 +00:00
yarikoptic
7cf8fecdec initial report 2017-10-10 17:06:10 +00:00
madalu
dc9c435c56 Added a comment 2017-10-09 15:46:09 +00:00
madalu
ca35daf0c7 Added a comment: Reproduction of bug with "pure" stack build 2017-10-09 15:43:16 +00:00
madalu
7821c45428 Added a comment 2017-10-09 14:52:54 +00:00
madalu
de91ffaab5 Added a comment: Second test (without line 134) 2017-10-09 14:40:45 +00:00
madalu
ca71c08634 Added a comment: First test 2017-10-09 14:22:22 +00:00
Joey Hess
34bb350724
webdav: Make --debug show all webdav operations. 2017-10-07 14:11:32 -04:00
Joey Hess
47aa0c7f73
response 2017-10-07 13:50:43 -04:00
madalu
0c8385ecc7 change wording 2017-10-07 16:38:21 +00:00
madalu
951e1ab816 2017-10-07 15:55:55 +00:00
madalu
5b51f21018 2017-10-06 23:46:48 +00:00
madalu
4fffbcf1e4 Added a comment 2017-10-06 23:45:13 +00:00
madalu
beca3ce2bc removed 2017-10-06 21:49:13 +00:00
yarikoptic
6760007707 Added a comment 2017-10-06 00:38:25 +00:00
yarikoptic
241e5290b6 Added a comment 2017-10-05 20:36:50 +00:00
yarikoptic
a523e7399a Added a comment: also the same for add 2017-10-05 17:00:51 +00:00
https://launchpad.net/~felixonmars
c922622a47 Added a comment 2017-10-05 14:02:03 +00:00
ilovezfs
9b77574113 2017-10-04 01:56:22 +00:00
ilovezfs
e251685a14 2017-10-04 01:43:32 +00:00
Joey Hess
b97f1df667
analysis; probably not a bug 2017-10-02 16:32:37 -04:00
Joey Hess
ffb0f6998b
followup 2017-10-02 12:36:56 -04:00
Joey Hess
2bc9fda65a
close old bug which got fixed in the meantime 2017-10-02 12:34:23 -04:00
Joey Hess
6d20ae24dc
Merge branch 'master' of ssh://git-annex.branchable.com 2017-10-02 11:59:30 -04:00
Joey Hess
c778b37e77
you requested his old closed bugs not be deleted yet 2017-10-02 11:58:31 -04:00
Joey Hess
fd0f04b1d0
forgot to add comment 2017-10-02 11:56:11 -04:00
jgoerzen
ade08227c6 Added a comment: A hint? 2017-10-02 02:05:32 +00:00
madalu
c12c37481e Added a comment 2017-09-30 03:07:30 +00:00
Joey Hess
5c32196a37
fix process and FD leak
Fix process and file descriptor leak that was exposed when git-annex was
built with ghc 8.2.1. Apparently ghc has changed its behavior of GC
of open file handles that are pipes to running processes. That
broke git-annex test on OSX due to running out of FDs.

Audited for all uses of Annex.new and made stopCoProcesses be called
once it's done with the state. Fixed several places that might have
leaked in other situations than running the test suite.

This commit was sponsored by Ewen McNeill.
2017-09-29 22:36:08 -04:00
michalrus
0f03ef3700 Added a comment 2017-09-29 20:38:59 +00:00
michalrus
1d744ca94a Added a comment 2017-09-29 20:38:31 +00:00
Joey Hess
d1a3f0bc8e
retitle 2017-09-29 15:46:50 -04:00