[
https://issues.apache.org/jira/browse/OAK-12533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Miroslav Smiljanic updated OAK-12533:
-------------------------------------
Description:
When an archive of a {{FileStore}} or {{ReadOnlyFileStore}} has no binary
references entry ({{{}.brf{}}}), or the entry can't be read,
{{TarReader.getBinaryReferences()}} returns {{{}null{}}}. The two operations
that use the binary references of an archive then lose them:
* {*}Data store GC{*}: {{TarReader.collectBlobReferences}} returns without
reporting any reference for that archive. The mark phase misses the binaries
referenced only from it, and the sweep can delete binaries that are still in
use.
* {*}Compaction cleanup{*}: when {{TarReader.sweep}} rewrites such an archive,
it copies no binary references, and {{TarWriter}} writes an empty {{.brf}} into
the new archive. The references are lost permanently, and later data store GC
runs read the empty entry without any warning.
An archive can have no usable {{.brf}} when:
* a remote archive is still open, or the Oak process terminated before closing
it;
* a TAR archive was written without it, e.g. by {{SegmentStoreMigrator}}
before OAK-12516;
* the entry is corrupt.
TAR recovery doesn't cover this case, because it only runs for archives without
a valid index.
> Data store GC and compaction cleanup lose binary references of archives
> without a .brf entry
> --------------------------------------------------------------------------------------------
>
> Key: OAK-12533
> URL: https://issues.apache.org/jira/browse/OAK-12533
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: segment-tar
> Reporter: Miroslav Smiljanic
> Assignee: Miroslav Smiljanic
> Priority: Major
>
> When an archive of a {{FileStore}} or {{ReadOnlyFileStore}} has no binary
> references entry ({{{}.brf{}}}), or the entry can't be read,
> {{TarReader.getBinaryReferences()}} returns {{{}null{}}}. The two operations
> that use the binary references of an archive then lose them:
> * {*}Data store GC{*}: {{TarReader.collectBlobReferences}} returns without
> reporting any reference for that archive. The mark phase misses the binaries
> referenced only from it, and the sweep can delete binaries that are still in
> use.
> * {*}Compaction cleanup{*}: when {{TarReader.sweep}} rewrites such an
> archive, it copies no binary references, and {{TarWriter}} writes an empty
> {{.brf}} into the new archive. The references are lost permanently, and later
> data store GC runs read the empty entry without any warning.
> An archive can have no usable {{.brf}} when:
> * a remote archive is still open, or the Oak process terminated before
> closing it;
> * a TAR archive was written without it, e.g. by {{SegmentStoreMigrator}}
> before OAK-12516;
> * the entry is corrupt.
> TAR recovery doesn't cover this case, because it only runs for archives
> without a valid index.
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)