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/08/23 22:22:00 UTC

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

    [ https://issues.apache.org/jira/browse/OAK-8298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16914684#comment-16914684 ] 

Matt Ryan commented on OAK-8298:
--------------------------------

Fixed in revision [r1865795|https://svn.apache.org/viewvc?view=revision&revision=1865795].

> [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
>    Affects Versions: 1.16.0, 1.10.4
>            Reporter: Matt Ryan
>            Assignee: Matt Ryan
>            Priority: Major
>             Fix For: 1.18.0
>
>
> 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
(v8.3.2#803003)