git-annex/Remote
Joey Hess 1243af4a18
toward SafeDropProof expiry checking
Added Maybe POSIXTime to SafeDropProof, which gets set when the proof is
based on a LockedCopy. If there are several LockedCopies, it uses the
closest expiry time. That is not optimal, it may be that the proof
expires based on one LockedCopy but another one has not expired. But
that seems unlikely to really happen, and anyway the user can just
re-run a drop if it fails due to expiry.

Pass the SafeDropProof to removeKey, which is responsible for checking
it for expiry in situations where that could be a problem. Which really
only means in Remote.Git.

Made Remote.Git check expiry when dropping from a local remote.

Checking expiry when dropping from a P2P remote is not yet implemented.
P2P.Protocol.remove has SafeDropProof plumbed through to it for that
purpose.

Fixing the remaining 2 build warnings should complete this work.

Note that the use of a POSIXTime here means that if the clock gets set
forward while git-annex is in the middle of a drop, it may say that
dropping took too long. That seems ok. Less ok is that if the clock gets
turned back a sufficient amount (eg 5 minutes), proof expiry won't be
noticed. It might be better to use the Monotonic clock, but that doesn't
advance when a laptop is suspended, and while there is the linux
Boottime clock, that is not available on other systems. Perhaps a
combination of POSIXTime and the Monotonic clock could detect laptop
suspension and also detect clock being turned back?

There is a potential future flag day where
p2pDefaultLockContentRetentionDuration is not assumed, but is probed
using the P2P protocol, and peers that don't support it can no longer
produce a LockedCopy. Until that happens, when git-annex is
communicating with older peers there is a risk of data loss when
a ssh connection closes during LOCKCONTENT.
2024-07-04 12:39:06 -04:00
..
Directory improve createDirectoryUnder to allow alternate top directories 2022-08-12 12:52:37 -04:00
External rclone special remote 2024-04-17 15:20:37 -04:00
Helper toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
List
Rsync
WebDAV Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
Adb.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
BitTorrent.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Borg.hs implement Unavilable for borg bup ddar directory rsync 2023-08-16 15:48:09 -04:00
Bup.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Ddar.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Directory.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
External.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
GCrypt.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Git.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
GitLFS.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Glacier.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Hook.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
HttpAlso.hs let Remote.availability return Unavilable 2023-08-16 14:31:31 -04:00
List.hs clarify comment 2024-06-04 14:29:24 -04:00
P2P.hs dropping from clusters 2024-06-23 09:43:40 -04:00
Rclone.hs rclone special remote 2024-04-17 15:20:37 -04:00
Rsync.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
S3.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Tahoe.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Web.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
WebDAV.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00