git-annex/Types
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
..
ActionItem.hs --explain for preferred/required content matching 2023-07-26 14:50:04 -04:00
AdjustedBranch.hs make sync update --unlock-present branch 2020-11-13 15:04:34 -04:00
Availability.hs let Remote.availability return Unavilable 2023-08-16 14:31:31 -04:00
Backend.hs implement URL to VURL migration 2024-03-01 16:42:02 -04:00
Benchmark.hs benchmark: Add --databases to benchmark sqlite databases 2019-10-29 16:59:27 -04:00
BranchState.hs clean up git-remote-annex git-annex branch handling 2024-05-15 17:33:38 -04:00
CatFileHandles.hs separate handles for cat-file and cat-file --batch-check 2021-09-24 13:16:13 -04:00
CleanupActions.hs propagate signals to the transferrer process group 2020-12-11 15:32:00 -04:00
Cluster.hs remove dead nodes when loading the cluster log 2024-06-16 14:39:44 -04:00
Command.hs git-annex-shell: accept uuid of remote that proxying is enabled for 2024-06-10 12:44:35 -04:00
Concurrency.hs have setConcurrency stop any running git coprocesses 2021-11-19 12:00:39 -04:00
Creds.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Crypto.hs support annex.shared-sop-command for encryption=shared 2024-01-12 13:31:18 -04:00
DeferredParse.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
DesktopNotify.hs remove many old version ifdefs 2019-07-05 15:09:37 -04:00
Difference.hs git-remote-annex support exporttree=yes remotes 2024-05-13 11:48:00 -04:00
Direction.hs improve concurrency of move/copy --from --to 2023-01-24 13:59:39 -04:00
Distribution.hs annex.addunlocked expressions 2019-12-20 15:56:25 -04:00
Export.hs Fix a build failure with ghc 9.2.2 2022-05-02 14:21:48 -04:00
FileMatcher.hs --explain for preferred/required content matching 2023-07-26 14:50:04 -04:00
GitConfig.hs git-annex-shell: proxy nodes located beyond remote cluster gateways 2024-06-26 12:56:16 -04:00
GitRemoteAnnex.hs avoid duplicates building up in outManifest 2024-05-24 15:10:56 -04:00
Group.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Import.hs implement importChanges optimisaton (not used yet) 2023-05-31 16:01:34 -04:00
IndexFiles.hs cache annex index filename for 1.5% speedup to queries 2020-04-10 13:37:04 -04:00
Key.hs git-annex unused --from remote skips its git-remote-annex keys 2024-05-14 15:17:40 -04:00
KeySource.hs convert KeySource to RawFilePath 2020-02-21 10:04:44 -04:00
Link.hs prep for fixing find --branch --unlocked 2021-03-02 13:39:31 -04:00
LockCache.hs more RawFilePath conversion 2020-10-29 10:50:29 -04:00
Messages.hs rename errorid to message-id 2023-04-26 12:53:30 -04:00
MetaData.hs simplify base64 to only use ByteString 2023-10-26 13:10:05 -04:00
Mime.hs Added mimeencoding= term to annex.largefiles expressions. 2019-04-30 12:17:22 -04:00
NumCopies.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
ProposedAccepted.hs separate RemoteConfig parsing basically working 2020-01-14 12:35:08 -04:00
RefSpec.hs Typo: sansative -> sensitive 2023-03-17 15:14:50 -04:00
Remote.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
RemoteConfig.hs git-remote-annex: Display full url when using remote with the shorthand url 2024-05-24 17:15:31 -04:00
RemoteState.hs improve comment 2020-01-06 12:53:09 -04:00
RepoVersion.hs v7 2018-10-25 18:24:23 -04:00
ScheduledActivity.hs avoid using MonadFail in ParseDuration 2020-08-15 15:53:35 -04:00
StallDetection.hs run codespell throughout fixing typos automagically 2024-05-01 15:46:21 -04:00
StandardGroups.hs a few forgotten remote config fields 2020-01-15 11:22:36 -04:00
StoreRetrieve.hs toward SafeDropProof expiry checking 2024-07-04 12:39:06 -04:00
Test.hs test: Add --test-debug option 2022-11-28 15:12:53 -04:00
Transfer.hs P2P protocol version 2, adding SUCCESS-PLUS and ALREADY-HAVE-PLUS 2024-06-18 16:21:40 -04:00
Transferrer.hs convert encode_c to ByteString 2023-04-07 17:10:49 -04:00
TransferrerPool.hs propagate signals to the transferrer process group 2020-12-11 15:32:00 -04:00
Transitions.hs handle transitions with read-only unmerged git-annex branches 2021-12-28 13:23:32 -04:00
TrustLevel.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Upgrade.hs split upgrade into v9 and v10 2022-01-19 13:09:33 -04:00
UrlContents.hs remove SafeFilePath 2020-05-11 14:04:56 -04:00
UUID.hs expire, trust et al, dead, describe: Support --json and --json-error-messages 2023-05-05 15:33:30 -04:00
VectorClock.hs deal better with clock skew situations, using vector clocks 2021-08-04 12:33:46 -04:00
View.hs add directory to views for files that lack specified metadata 2023-02-07 16:28:46 -04:00
WorkerPool.hs improve concurrency of move/copy --from --to 2023-01-24 13:59:39 -04:00