You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
If we get an EINTEGRITY error while reading stuff from the cache, the cached data should be unlinked. There's no need to remove associated index entries, though.
This should be implementable entirely within lib/content/read.js, since that's the single interface for ever reading data out of the cache. Things should be removable before any errors are actually emitted through either the promise or stream interfaces.
That said, this "feature" might be a bad idea -- in exchange for automatically clearing out bad caches, we might be giving up the ability to debug integrity issues. I think this is ok, though, because cacache errs on the side of throwing things away, and without this change, users are left with the responsibility of figuring out and fixing cache issues. They really shouldn't have to.
The text was updated successfully, but these errors were encountered:
Updated idea: move+rename the file into a /corrupted-content-vX directory using the failed hash. Use the same structure as the content directory, and the same version number. This dir should be cleaned up as part of verify(), and when throwing EINTEGRITY errors, we should include the path to the corrupted data in the error object.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If we get an EINTEGRITY error while reading stuff from the cache, the cached data should be unlinked. There's no need to remove associated index entries, though.
This should be implementable entirely within
lib/content/read.js
, since that's the single interface for ever reading data out of the cache. Things should be removable before any errors are actually emitted through either the promise or stream interfaces.That said, this "feature" might be a bad idea -- in exchange for automatically clearing out bad caches, we might be giving up the ability to debug integrity issues. I think this is ok, though, because cacache errs on the side of throwing things away, and without this change, users are left with the responsibility of figuring out and fixing cache issues. They really shouldn't have to.
The text was updated successfully, but these errors were encountered: