git-annex/Remote
Joey Hess 167ea45d0a
concurrency safety for delegates
Make only 1 thread try to generate a delegate for an external special
remote at a time. This avoids concurrent remote initialization failing.

Avoid removing an emphemeral delegate when another process is also using
it. Rather than per-delegate locking, there is 1 lock per external
special remote, and while a shared lock is held, some ephemeral delgates
are in use, and other processes avoid removing them. This can leave one
process to remove ephemeral delegates that were created by another
process, but they will get removed in the end. This also makes the
removal crash safe.

Note that externalEphemeralDelegates is a list of remotes. Why not
just use Annex.remotes? Well, removeEphemeralDelegates is run as a
shutdown action, which means that with -J, it's run in the main Annex
state. But getDelegateRemote is run is a forked state, and modifies
Annex.remotes. Currently, mergeState does not merge in changes to
Annex.remotes, so that is not visible to the shutdown action.
2026-04-09 14:04:09 -04:00
..
Directory convert withFile and withBinaryFile to close-on-exec safe versions 2025-09-05 15:44:43 -04:00
External concurrency safety for delegates 2026-04-09 14:04:09 -04:00
Helper disableremote cleanup of per-remote lock files 2026-04-09 11:16:56 -04:00
List findcomputed: New command, displays information about computed files. 2025-03-18 12:55:48 -04:00
Rsync more OsPath conversion 2025-01-28 16:31:19 -04:00
WebDAV factor out extendUrlWithPath and use for git http remote key urls 2026-02-16 14:04:53 -04:00
Adb.hs adb: Avoid deleting contents of a non-empty directory when removing the last exported file from the directory 2026-03-02 12:16:55 -04:00
BitTorrent.hs add repairKey method 2026-01-23 16:51:41 -04:00
Borg.hs add repairKey method 2026-01-23 16:51:41 -04:00
Bup.hs disableremote cleanup of per-remote lock files 2026-04-09 11:16:56 -04:00
Compute.hs add repairKey method 2026-01-23 16:51:41 -04:00
Ddar.hs add repairKey method 2026-01-23 16:51:41 -04:00
Directory.hs fix build warning 2026-04-01 10:09:37 -04:00
External.hs concurrency safety for delegates 2026-04-09 14:04:09 -04:00
GCrypt.hs add repairKey method 2026-01-23 16:51:41 -04:00
Git.hs fix auto-initializing reversion 2026-03-02 11:26:55 -04:00
GitLFS.hs add repairKey method 2026-01-23 16:51:41 -04:00
Glacier.hs add repairKey method 2026-01-23 16:51:41 -04:00
Hook.hs add repairKey method 2026-01-23 16:51:41 -04:00
HttpAlso.hs httpalso: Fix bugs in handling content not being present on the remote 2026-02-19 13:00:48 -04:00
List.hs factor out findType' 2026-03-25 13:24:52 -04:00
Mask.hs add repairKey method 2026-01-23 16:51:41 -04:00
P2P.hs add repairKey method 2026-01-23 16:51:41 -04:00
Rclone.hs rclone special remote 2024-04-17 15:20:37 -04:00
Rsync.hs fix build warning 2026-04-01 10:39:01 -04:00
S3.hs factor out extendUrlWithPath and use for git http remote key urls 2026-02-16 14:04:53 -04:00
Tahoe.hs add repairKey method 2026-01-23 16:51:41 -04:00
Web.hs add repairKey method 2026-01-23 16:51:41 -04:00
WebDAV.hs add repairKey method 2026-01-23 16:51:41 -04:00