2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-11 07:41:03 +00:00
restic/repository
Philipp Serr 7b11660f4f Prevent concurrent processing of same blob
... by first adding a preliminary index entry and making this fail if
an index entry for the same blob already exists.

A preliminary index entry is characterized by not yet being associated
with a pack. Until now, these entries where added to the index just
like final index entries using index.Store, which silently overwrites
existing index entries.

This commit adds a new method index.StoreInProgress which refuses to
overwrite existing index entries and allows for creating preliminary
index entries only. The existing method index.Store has not been
changed and continues to silently overwrite existing index entries.
This distinction is important, as otherwise, it would be impossible to
update a preliminary index entry after the blob has been written to a
pack.

Resolves: restic#292
2015-09-27 16:56:49 +02:00
..
testdata Add test and benchmark for LoadIndex 2015-07-05 11:07:10 +02:00
blob.go Use array instead of hash for backend.ID 2015-07-25 18:01:57 +02:00
config_test.go repository: Refactor Config 2015-07-05 11:07:10 +02:00
config.go Use array instead of hash for backend.ID 2015-07-25 18:01:57 +02:00
doc.go repository: fix package doc typo 2015-06-28 09:30:33 +02:00
index_test.go Prevent concurrent processing of same blob 2015-09-27 16:56:49 +02:00
index.go Prevent concurrent processing of same blob 2015-09-27 16:56:49 +02:00
key.go Use array instead of hash for backend.ID 2015-07-25 18:01:57 +02:00
parallel_test.go Allow cancelling parallel workers on files 2015-07-05 11:07:10 +02:00
parallel.go Small refactorings 2015-09-05 18:41:58 +02:00
pool.go Extract chunker 2015-07-08 16:58:23 -04:00
repository_test.go Reduce memory usage for fuse mount 2015-07-26 14:25:59 +02:00
repository.go Prevent concurrent processing of same blob 2015-09-27 16:56:49 +02:00