git-annex/Assistant
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
..
Alert Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
Install fix build on OSX 2023-03-03 13:20:49 -04:00
Pairing filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Threads fix transfer lock file for Download to not include uuid 2024-03-25 14:47:46 -04:00
Types Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
WebApp assistant: When generating a gpg secret key, avoid hardcoding the key algorithm and size 2024-01-09 15:31:53 -04:00
Alert.hs
BranchChange.hs
Changes.hs
Commits.hs
Common.hs use fastDebug everywhere it can be used 2021-04-06 15:41:24 -04:00
CredPairCache.hs
DaemonStatus.hs let Remote.availability return Unavilable 2023-08-16 14:31:31 -04:00
DeleteRemote.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Drop.hs add SeekInput (not yet used) 2020-09-15 15:41:13 -04:00
Fsck.hs
Gpg.hs
Install.hs Windows: Support long filenames in more (possibly all) of the code 2023-03-01 15:55:58 -04:00
MakeRemote.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
MakeRepo.hs RawFilePath conversion 2023-10-26 13:58:49 -04:00
Monad.hs turn of PackageImports in cabal file 2022-02-25 13:16:36 -04:00
NamedThread.hs
Pairing.hs
Pushes.hs
RemoteControl.hs
Repair.hs fix empty tree import when directory does not exist 2023-08-15 12:57:41 -04:00
RepoProblem.hs
Restart.hs split out Utility.Url.Parse 2023-08-14 12:28:10 -04:00
ScanRemotes.hs
Ssh.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Sync.hs convert checkAvailable to use availability rather than localpath 2023-08-16 15:57:30 -04:00
TransferQueue.hs fix --from overriding annex-ignore 2023-11-30 15:12:07 -04:00
TransferSlots.hs add directional stalldetection and bwlimit configs 2024-01-19 15:27:53 -04:00
Unused.hs Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
Upgrade.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
WebApp.hs