Details
Description
Problem
NXRM proxy repo to NXRM group repo npm package metadata requests send an If-Modified-Since, but no If-None-Match header for npm package metadata. However the responding NXRM always will respond with 200 instead of 304, even though there were no changes to the npm package metadata.
When the requesting proxy repo receives the 200 response, and that proxy repo is also in a group repository, both the proxy repo and group repo npm package metadata is replaced - even though the content is exactly the same as what is already cached.
Over time this fills the NXRM proxy repo and group repo blobstore with soft-deleted npm package metadata bytes and properties files which are the replaced package metadata.
If the metadata max age is set to a low value on the proxy repo and incoming requests are high, this can quickly fill the blobstore with soft-deleted files which require more frequent than usual running of the Compact blob store task to remove these files.
It was noticed that if NXRM ( 3.17.0 and newer required due to NEXUS-19941 ) proxies the official NPM registry, then outbound package metadata requests will send both an If-None-Match and If-Modified-Since header. Consequently in that case, the remote returns a 304 if the package metadata is not changed and the blob files are not replaced.
The following combinations have been confirmed to exhibit this problem ( others may as well):
NXRM 3.17.0 -> NXRM 3.9.0
NXRM 3.17.0 -> NXRM 3.17.0
NXRM 3.19.0 -> NXRM 3.19.0
NXRM 3.17.0 -> NXRM 2.14.15
Attachments
Issue Links
- relates
-
NEXUS-19941 npm proxy outbound requests can send an invalid If-None-Match header value causing cached metadata assets to be replaced
-
- Closed
-