git-annex/Assistant/Threads
Joey Hess f04d9574d6
fix transfer lock file for Download to not include uuid
While redundant concurrent transfers were already prevented in most
cases, it failed to prevent the case where two different repositories were
sending the same content to the same repository. By removing the uuid
from the transfer lock file for Download transfers, one repository
sending content will block the other one from also sending the same
content.

In order to interoperate with old git-annex, the old lock file is still
locked, as well as locking the new one. That added a lot of extra code
and work, and the plan is to eventually stop locking the old lock file,
at some point in time when an old git-annex process is unlikely to be
running at the same time.

Note that in the case of 2 repositories both doing eg
`git-annex copy foo --to origin`
the output is not that great:

copy b (to origin...)
  transfer already in progress, or unable to take transfer lock
git-annex: transfer already in progress, or unable to take transfer lock
97%   966.81 MiB      534 GiB/s 0sp2pstdio: 1 failed

  Lost connection (fd:14: hPutBuf: resource vanished (Broken pipe))

  Transfer failed

Perhaps that output could be cleaned up? Anyway, it's a lot better than letting
the redundant transfer happen and then failing with an obscure error about
a temp file, which is what it did before. And it seems users don't often
try to do this, since nobody ever reported this bug to me before.
(The "97%" there is actually how far along the *other* transfer is.)

Sponsored-by: Joshua Antonishen on Patreon
2024-03-25 14:47:46 -04:00
..
Committer.hs pre-commit: Avoid committing the git-annex branch 2024-02-12 14:42:11 -04:00
ConfigMonitor.hs add git ls-tree --long parser 2021-03-23 12:47:00 -04:00
Cronner.hs assistant: Avoid unncessary git repository repair 2021-06-30 18:00:16 -04:00
DaemonStatus.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Exporter.hs convert checkAvailable to use availability rather than localpath 2023-08-16 15:57:30 -04:00
Glacier.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Merger.hs sync: When in an adjusted branch, merge changes from the original branch 2023-07-06 12:42:24 -04:00
MountWatcher.hs filter out control characters in warning messages 2023-04-10 15:55:44 -04:00
NetWatcher.hs filter out control characters in warning messages 2023-04-10 15:55:44 -04:00
PairListener.hs filter out control characters in warning messages 2023-04-10 15:55:44 -04:00
ProblemFixer.hs convert checkAvailable to use availability rather than localpath 2023-08-16 15:57:30 -04:00
Pusher.hs convert checkAvailable to use availability rather than localpath 2023-08-16 15:57:30 -04:00
RemoteControl.hs convert to withCreateProcess for async exception safety 2020-06-04 12:44:09 -04:00
SanityChecker.hs filter out control characters in warning messages 2023-04-10 15:55:44 -04:00
TransferPoller.hs fix transfer lock file for Download to not include uuid 2024-03-25 14:47:46 -04:00
Transferrer.hs propagate git-annex -c on to transferrer child process 2020-12-15 11:36:25 -04:00
TransferScanner.hs new matching options --want-get-by and --want-drop-by 2022-07-28 13:26:03 -04:00
TransferWatcher.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Upgrader.hs fix windows assistant upgrade glitch 2020-11-19 12:50:25 -04:00
UpgradeWatcher.hs finished this stage of the RawFilePath conversion 2020-11-04 14:20:37 -04:00
Watcher.hs push RawFilePath down into Annex.ReplaceFile 2023-10-26 13:36:49 -04:00
WebApp.hs webapp: Added --port option, and annex.port config 2024-01-25 14:08:36 -04:00