add key stability checking interface
Needed for resuming from chunks. Url keys are considered not stable. I considered treating url keys with a known size as stable, but just don't feel that is enough information.
This commit is contained in:
parent
aad8cfe718
commit
13bbb61a51
5 changed files with 18 additions and 1 deletions
|
@ -45,6 +45,7 @@ genBackend hash = Just Backend
|
|||
, fsckKey = Just $ checkKeyChecksum hash
|
||||
, canUpgradeKey = Just needsUpgrade
|
||||
, fastMigrate = Just trivialMigrate
|
||||
, isStableKey = const True
|
||||
}
|
||||
|
||||
genBackendE :: Hash -> Maybe Backend
|
||||
|
|
|
@ -25,6 +25,9 @@ backend = Backend
|
|||
, fsckKey = Nothing
|
||||
, canUpgradeKey = Nothing
|
||||
, fastMigrate = Nothing
|
||||
-- The content of an url can change at any time, so URL keys are
|
||||
-- not stable.
|
||||
, isStableKey = const False
|
||||
}
|
||||
|
||||
{- Every unique url has a corresponding key. -}
|
||||
|
|
|
@ -23,6 +23,7 @@ backend = Backend
|
|||
, fsckKey = Nothing
|
||||
, canUpgradeKey = Nothing
|
||||
, fastMigrate = Nothing
|
||||
, isStableKey = const True
|
||||
}
|
||||
|
||||
{- The key includes the file size, modification time, and the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue