upgrade_repo_v2: Use atomic replace for supported backends
This commit is contained in:
parent
7559d2f105
commit
e36a40db10
13 changed files with 82 additions and 17 deletions
|
@ -268,6 +268,11 @@ func (be *MemoryBackend) Hasher() hash.Hash {
|
|||
return md5.New()
|
||||
}
|
||||
|
||||
// HasAtomicReplace returns whether Save() can atomically replace files
|
||||
func (be *MemoryBackend) HasAtomicReplace() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Delete removes all data in the backend.
|
||||
func (be *MemoryBackend) Delete(ctx context.Context) error {
|
||||
be.m.Lock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue