Details
-
Bug
-
Resolution: Fixed
-
Critical
-
3.42.0
-
3
-
Yes
-
NXRM Immortals Sprint 44, NXRM Immortals Sprint 45
-
2
-
non-concept
-
2
Description
ISSUE:
Accessing maven-metadata.xml via Maven group repository generates a new blob even no change in the group members.
This means any "mvn" command may generate unnecessary blob files.
These unnecessary blobs could contribute to the slowness of "Cleanup unused asset blobs" task and "Reconcile component database from blob store" task.
REPRODUCE STEPS:
- Install NXRM 3.42.0 with H2 or PostgreSQL
- Create maven-proxy (https://repo1.maven.org/maven2/) with Maximum metadata age = 1440 (default), maven-hosted, and maven-group repositories, with default settings
- Accessing some maven-metadata.xml via maven-group, for example:
curl -I http://localhost:8081/repository/maven-group/junit/junit/maven-metadata.xml
- Check how many properties files
find ./sonatype-work/nexus3/blobs/default/content/vol-* -name '*.properties' | wc -l
- Repeat the curl and find commands
EXPECTED BEHAVIOUR:
As Maximum metadata age = 1440 and no assets are added in maven-proxy and maven-hosted, the "find ... | wc -l" command should return same number.
ACTUAL BEHAVIOUR:
Executing one "curl" command increases 5 "*.properties" files.
POTENTIAL CAUSE:
Please check "MavenContentGroupFacetImpl#cache" as it seems this method always calls "FluentAsset::markAsStale", which may make attributes.cache.cache_token = "invalidated".
Important Note:
While the fix version of this issue is 3.43.0, the fix was incomplete for one specific circumstance outlined in NEXUS-36659 fixed in 3.44.0.
Therefore all customers affected by maven-metadata.xml issues for group repositories should upgrade to 3.44.0 or newer.
Attachments
Issue Links
- relates
-
NEXUS-35259 PyPI INDEX type asset is always created by accessing it via group repo
-
- Closed
-
-
NEXUS-36659 maven-metadata.xml requests to group repository will recreate unchanged blobs in group repository blobstore after Invalidate Cache
-
- Closed
-