skip deleting blob if it doesn't already exist
If it has already disappeard, thre is no need to remove it. Signed-off-by: cappyzawa <cappyzawa@yahoo.ne.jp>
This commit is contained in:
parent
dee21c0394
commit
04ad58a41f
1 changed files with 4 additions and 0 deletions
|
@ -144,6 +144,10 @@ func MarkAndSweep(ctx context.Context, storageDriver driver.StorageDriver, regis
|
||||||
}
|
}
|
||||||
err = vacuum.RemoveBlob(string(dgst))
|
err = vacuum.RemoveBlob(string(dgst))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if _, ok := err.(driver.PathNotFoundError); ok {
|
||||||
|
emit("skip deleting blob %s: %v", dgst, err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
return fmt.Errorf("failed to delete blob %s: %v", dgst, err)
|
return fmt.Errorf("failed to delete blob %s: %v", dgst, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue