mirror of
https://github.com/restic/restic.git
synced 2025-10-10 08:13:16 +00:00
Fix non-intuitive repository behavior
- The SaveBlob method now checks for duplicates. - Moves handling of pending blobs to MasterIndex. -> also cleans up pending index entries when they are saved in the index -> when using SaveBlob no need to care about index any longer - Always check for full index and save it when storing packs. -> removes the need of an index uploader -> also removes the verbose "uploaded intermediate index" messages - The Flush method now also saves the index - Fix race condition when checking and saving full/non-finalized indexes
This commit is contained in:
@@ -84,7 +84,8 @@ func Repack(ctx context.Context, repo restic.Repository, packs restic.IDSet, kee
|
||||
h, tempfile.Name(), id)
|
||||
}
|
||||
|
||||
_, err = repo.SaveBlob(ctx, entry.Type, plaintext, entry.ID)
|
||||
// We do want to save already saved blobs!
|
||||
_, _, err = repo.SaveBlob(ctx, entry.Type, plaintext, entry.ID, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user