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:
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.
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.
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.