Move testing for known blobs to Archiver

This removes the list of in-flight blobs from the master index and
instead keeps a list of "known" blobs in the Archiver. "known" here
means: either already processed, or included in an index. This property
is tested atomically, when the blob is not in the list of "known" blobs,
it is added to the list and the caller is responsible to make this
happen (i.e. save the blob).
This commit is contained in:
Alexander Neumann
2016-02-01 23:50:56 +01:00
parent 382c766983
commit 4f1f03cdb9
6 changed files with 45 additions and 100 deletions

View File

@@ -136,7 +136,7 @@ func repackBlob(src, dst *repository.Repository, id backend.ID) error {
return errors.New("LoadBlob returned wrong data, len() doesn't match")
}
_, err = dst.SaveAndEncrypt(blob.Type, buf, &id, true)
_, err = dst.SaveAndEncrypt(blob.Type, buf, &id)
if err != nil {
return err
}