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
|
@ -129,6 +129,11 @@ func (be *beSwift) Hasher() hash.Hash {
|
|||
return md5.New()
|
||||
}
|
||||
|
||||
// HasAtomicReplace returns whether Save() can atomically replace files
|
||||
func (be *beSwift) HasAtomicReplace() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Load runs fn with a reader that yields the contents of the file at h at the
|
||||
// given offset.
|
||||
func (be *beSwift) Load(ctx context.Context, h restic.Handle, length int, offset int64, fn func(rd io.Reader) error) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue