CI to automate build of cargo lockfiles on different Alpine releases for git-annex aports https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/git-annex
Find a file
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
Annex Improve behavior when -J transfers multiple files that point to the same key 2017-10-17 17:10:50 -04:00
Assistant Improve behavior when -J transfers multiple files that point to the same key 2017-10-17 17:10:50 -04:00
Backend migrate: WORM keys containing spaces will be migrated to not contain spaces anymore 2017-08-17 15:09:38 -04:00
Build update windows build scripts to use stack 2017-10-17 13:00:29 -04:00
CmdLine Avoid repeated checking that files passed on the command line exist. 2017-10-16 14:10:20 -04:00
Command Improve behavior when -J transfers multiple files that point to the same key 2017-10-17 17:10:50 -04:00
Config use DynamicConfig to handle cost-command 2017-08-17 14:04:29 -04:00
Database fix build with old version of persistent 2017-09-25 09:57:41 -04:00
debian Added a note to standalone build that it would break datalad << 0.9.1 2017-10-11 12:13:19 -04:00
doc Improve behavior when -J transfers multiple files that point to the same key 2017-10-17 17:10:50 -04:00
Git sync: Added --cleanup, which removes local and remote synced/ branches. 2017-09-28 14:58:48 -04:00
Limit AssociatedFile newtype 2017-03-10 13:35:31 -04:00
Logs Improve behavior when -J transfers multiple files that point to the same key 2017-10-17 17:10:50 -04:00
Messages typo 2017-05-19 10:57:59 -04:00
P2P AssociatedFile newtype 2017-03-10 13:35:31 -04:00
Remote fix version number 2017-10-11 11:43:03 -04:00
RemoteDaemon add annex-ignore-command and annex-sync-command configs 2017-08-17 13:54:14 -04:00
standalone update windows build scripts to use stack 2017-10-17 13:00:29 -04:00
static Revert "remove newlines from static js and css" 2014-06-13 02:20:39 -04:00
templates version: Added "dependency versions" line. 2017-04-07 18:16:11 -04:00
Types Improve behavior when -J transfers multiple files that point to the same key 2017-10-17 17:10:50 -04:00
Upgrade squelch a couple of warnings about moveAnnex return code 2017-02-28 12:49:17 -04:00
Utility remove redundant pattern match 2017-09-24 16:17:58 -04:00
.ghci workaround for ghci fragility in reusing objects compiled with ghc 2012-10-20 16:20:42 -04:00
.gitattributes update changelog location 2016-08-22 23:54:11 -04:00
.gitignore gitignore git-annex-shell 2017-03-17 19:19:10 -04:00
.mailmap alias for Yaroslav @ yahoo to mailmap 2015-09-09 12:38:59 -04:00
Annex.hs Improve behavior when -J transfers multiple files that point to the same key 2017-10-17 17:10:50 -04:00
Assistant.hs add exporter thread to assistant 2017-09-20 15:29:13 -04:00
Backend.hs annex.backend is the new name for what was annex.backends 2017-05-09 15:04:07 -04:00
bash-completion.bash update from optparse-applicative output 2017-06-09 11:30:24 -04:00
build.bat let build.bat also be run from cygwin terminal 2015-04-21 14:12:14 -04:00
BuildInfo.hs fix build with old ghc 2017-05-10 14:36:35 -04:00
CHANGELOG Improve behavior when -J transfers multiple files that point to the same key 2017-10-17 17:10:50 -04:00
CmdLine.hs Make --json and --quiet suppress automatic init messages 2016-09-05 15:34:38 -04:00
Command.hs make query commands not output extraneous messages 2017-02-16 13:24:35 -04:00
Common.hs adeiu, MissingH 2017-05-16 01:03:52 -04:00
Config.hs configuration and docs for tracking exports 2017-09-19 13:05:43 -04:00
COPYRIGHT relicense Utility/GPG.hs BSD as the rest of Utility is 2017-03-10 15:08:21 -04:00
Creds.hs finish git-annex enable-tor 2016-11-29 17:30:27 -04:00
Crypto.hs add KeyVariety type 2017-02-24 15:16:56 -04:00
ghci avoid tab warnings from ghc 8 2016-11-17 13:39:30 -04:00
git-annex.cabal Revert "new Win32 fails to build; fall back to old one" 2017-10-16 15:38:35 -04:00
git-annex.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
git-union-merge.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
Git.hs Propigate GIT_DIR and GIT_WORK_TREE environment to external special remotes. 2016-05-06 12:26:44 -04:00
Jenkinsfile Add initial Jenkins pipeline script 2016-12-01 12:05:26 -04:00
Key.hs Fix build with QuickCheck 2.10. 2017-06-17 13:04:48 -04:00
Limit.hs securehash matching 2017-02-27 15:02:44 -04:00
Logs.hs implement export.log and resolve export conflicts 2017-08-31 15:47:23 -04:00
Makefile /dev/null stderr when generating completions 2017-09-14 13:10:45 -04:00
Messages.hs clear regions before ssh prompt 2017-05-16 15:50:11 -04:00
NEWS releasing package git-annex version 6.20170228 2017-02-28 14:41:57 -04:00
README use https 2014-11-06 14:20:10 -04:00
Remote.hs prevent exporttree=yes on remotes that don't support exports 2017-09-07 13:48:44 -04:00
Setup.hs Added git-remote-tor-annex, which allows git pull and push to the tor hidden service. 2016-11-21 17:27:38 -04:00
stack.yaml new lts 2017-10-17 13:00:22 -04:00
Test.hs fix process and FD leak 2017-09-29 22:36:08 -04:00
Types.hs Improve behavior when -J transfers multiple files that point to the same key 2017-10-17 17:10:50 -04:00
Upgrade.hs Avoid backtraces on expected failures when built with ghc 8; only use backtraces for unexpected errors. 2016-11-15 21:29:54 -04:00

git-annex allows managing files with git, without checking the file
contents into git. While that may seem paradoxical, it is useful when
dealing with files larger than git can currently easily handle, whether due
to limitations in memory, checksumming time, or disk space.

For documentation, see doc/ or <https://git-annex.branchable.com/>