nydus-snapshotter
nydus-snapshotter copied to clipboard
If it failed to delete the blob cache, residual cache may occur.
If it failed to delete the blob cache, residual cache may occur. Is there any other way to handle the problem?
if info.Kind == snapshots.KindCommitted {
blobDigest := info.Labels[snpkg.TargetLayerDigestLabel]
go func() {
if err := o.fs.RemoveCache(blobDigest); err != nil {
log.L.WithError(err).Errorf("Failed to remove cache %s", blobDigest)
}
}()
}
@shitou12345678 Maybe we need to remove cache synchronously? cc @changweige
Generally, it can hardly fail to delete blob cache stuff. Can you see the particular error when it failed? Even we migrate a synchronously way to remove blob cache, it still fails.
In the nydus component, i haven't had such a problem. But in fact, deleting the cache and the kernel calling the inuse interface may occur the error ”device or resource busy”, so it may lead to residual.
I'll take this issue.