[
https://issues.apache.org/jira/browse/OAK-12516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Miroslav Smiljanic resolved OAK-12516.
--------------------------------------
Resolution: Won't Do
Closing this issue in favour of OAK-12533.
> SegmentStoreMigrator silently skips missing binary references producing a TAR
> archive that fails with "Unrecognized magic number"
> ---------------------------------------------------------------------------------------------------------------------------------
>
> Key: OAK-12516
> URL: https://issues.apache.org/jira/browse/OAK-12516
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: segment-aws, segment-azure, segment-tar
> Reporter: Miroslav Smiljanic
> Assignee: Miroslav Smiljanic
> Priority: Major
>
> For remote segment stores (Azure, AWS) the binary references file
> ({{{}<archive>.brf{}}}) of an archive can be missing:
> * the archive is still open (it is the archive currently being written to),
> or
> * the Oak process terminated before the archive was closed.
> In both cases {{SegmentArchiveReader.getBinaryReferences()}} returns
> {{{}null{}}}, which the interface allows ({{{}@Nullable{}}}).
> {{SegmentStoreMigrator.migrateBinaryRef}} skips the missing binary references
> without any warning, and the archive is migrated without a {{.brf}} entry.
> When the target is a TAR store, reading the binary references of that archive
> with {{org.apache.jackrabbit.oak.segment.file.tar.SegmentTarReader}} fails
> with:
> {noformat}
> java.io.IOException:
> org.apache.jackrabbit.oak.segment.file.tar.binaries.InvalidBinaryReferencesIndexException:
> Unrecognized magic number
> at
> org.apache.jackrabbit.oak.segment.file.tar.SegmentTarReader.getBinaryReferences(SegmentTarReader.java:147)
> {noformat}
> {{SegmentTarReader}} assumes the {{.brf}} entry is always present right
> before the graph entry. When it is missing, it reads the end of the last
> segment instead. The error looks like data corruption, but the segments are
> intact.
>
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)