mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 21:05:10 +00:00
b5062959c8
Before, all backend implementations were required to return an error if the file that is to be written already exists in the backend. For most backends, that means making a request (e.g. via HTTP) and returning an error when the file already exists. This is not accurate, the file could have been created between the HTTP request testing for it, and when writing starts. In addition, apart from the `config` file in the repo, all other file names have pseudo-random names with a very very low probability of a collision. And even if a file name is written again, the way the restic repo is structured this just means that the same content is placed there again. Which is not a problem, just not very efficient. So, this commit relaxes the requirement to return an error when the file in the backend already exists, which allows reducing the number of API requests and thereby the latency for remote backends. |
||
---|---|---|
.. | ||
azure | ||
b2 | ||
gs | ||
local | ||
location | ||
mem | ||
rest | ||
s3 | ||
sftp | ||
swift | ||
test | ||
testdata | ||
backend_error.go | ||
backend_retry_test.go | ||
backend_retry.go | ||
doc.go | ||
http_transport.go | ||
layout_default.go | ||
layout_rest.go | ||
layout_s3legacy.go | ||
layout_test.go | ||
layout.go | ||
paths.go | ||
semaphore.go | ||
utils_test.go | ||
utils.go |