Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.16.0, 1.10.4
-
None
Description
Blobs that are uploaded to the content repository are supposed to be tracked by the BlobIdTracker once the blob is saved. This is done for blobs uploaded the traditional way in DataStoreBlobStore.writeBlob() [0].
For blobs uploaded directly, they do not go through this method and so the blob ID is never added to the BlobIdTracker. This has impact on DSGC as the MarkSweepGarbageCollector relies on the BlobIdTracker to provide an accurate accounting of the blob IDs in the blob store to determine which ones to retain and which to delete.
This should be a pretty easy fix. All direct uploads pass through DataStoreBlobStore.completeBlobUpload() [1], and we have at that point access to the DataRecord created by the direct upload. We can get the blob ID from the DataRecord and add it to the BlobIdTracker there.