You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Matt Ryan (JIRA)" <ji...@apache.org> on 2019/05/03 23:09:00 UTC

[jira] [Created] (OAK-8298) [Direct Binary Access] Blobs that are directly uploaded are not tracked by BlobIdTracker

Matt Ryan created OAK-8298:
------------------------------

             Summary: [Direct Binary Access] Blobs that are directly uploaded are not tracked by BlobIdTracker
                 Key: OAK-8298
                 URL: https://issues.apache.org/jira/browse/OAK-8298
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: blob-cloud, blob-cloud-azure, blob-plugins
            Reporter: Matt Ryan
            Assignee: Matt Ryan


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.

[0] - [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStore.java#L241]

[1] - [https://github.com/apache/jackrabbit-oak/blob/46cde5ee49622c94bc95648edf84cf4c00ae1d58/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/DataStoreBlobStore.java#L723]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)