Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
3.38.1
-
3
-
NXRM Neo Groomed
-
3
-
2
Description
Create a scenario where a blob is soft deleted in a file based blobstore while using PostgreSQL. Allow the format specific Admin - Cleanup unused asset blobs task to cleanup database references to the assets.
Now run the Admin - Compact blob store task to perform the hard deletes of those soft-deleted blobs.
For every asset that is soft-deleted, the nexus.log contains a WARN level message suggesting it is NOT expected that a soft-deleted blob was found and will be deleted. This can fill the logs with alarming messages at WARN level for something that is working normally. In some cases where a cleanup policy has deleted thousands or millions of assets, the nexus.log will be enormous.
Example message created running the compact blob store task:
2022-05-04 08:06:48,505-0300 WARNÂ [quartz-11-thread-20] *SYSTEM org.sonatype.nexus.blobstore.file.FileBlobStore - Attempt to access soft-deleted blob f234516f-34dd-4b08-a990-136851431a3c attributes: /nexus-testing/3.38.1/nexus-installer-3.38.1-01-mac-archive/sonatype-work/nexus3/blobs/default/content/vol-42/chap-14/f234516f-34dd-4b08-a990-136851431a3c.properties \{deletedDateTime=1651662336021, deleted=true, @BlobStore.created-by=admin, creationTime=1651662176364, @BlobStore.created-by-ip=127.0.0.1, @BlobStore.content-type=text/plain, sha1=a9f358633c9b67ade81b111f3ec417dd565df09f, @BlobStore.blob-name=/base1/child2/file.txt, deletedReason=Removing unused asset blob, @Bucket.repo-name=raw-hosted, size=888}
Notice the deletedReason is "Removing unused asset blob" - this blob was soft-deleted by the Admin - Cleanup unused asset blobs task which is the normal asynchronous way to delete blob references inside the PostgreSQL and H2 Databases.
Logging was originally adding at WARN in the Blobstore class to track attributes of an asset being accessed in an unexpected soft-deleted state . See this comment and also NEXUS-18675 where the jira actually implemented the change.
Reproduce
1. Deploy a RAW asset to a raw-hosted repo
2. Delete the raw component in the Browse view.
3. Wait for, or manually run the Admin - Cleanup unused asset blobs task.
4. run the Admin - Compact blob store task against the blobstore containing the deleted blobs.
5. Observe the nexus.log contains WARN messages.
Expected
Do not spam the main nexus.log with messages at WARN level for operations that are considered normal when running compact blob store.
Only log at WARN this message when an asset is accessed in the blobstore when it is in an unexpected soft-deleted state.
Ensure all blob store formats ( file,S3 ) work similarly.
Change the level to DEBUG
Attachments
Issue Links
- is caused by
-
NEXUS-18675 log blob deleted reason for s3 based deleted blobs
-
- Closed
-
- relates
-
NEXUS-34479 Compact blobstore task log reports WARNs about Attempt to access soft-deleted under directpath
-
- New
-