nydus-snapshotter icon indicating copy to clipboard operation
nydus-snapshotter copied to clipboard

If it failed to delete the blob cache, residual cache may occur.

Open shitou12345678 opened this issue 1 year ago • 4 comments

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 avatar Oct 10 '24 02:10 shitou12345678

@shitou12345678 Maybe we need to remove cache synchronously? cc @changweige

imeoer avatar Oct 11 '24 02:10 imeoer

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.

changweige avatar Oct 11 '24 02:10 changweige

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.

shitou12345678 avatar Oct 14 '24 06:10 shitou12345678

I'll take this issue.

BraveY avatar Feb 11 '25 11:02 BraveY