[
https://issues.apache.org/jira/browse/OAK-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16340906#comment-16340906
]
Francesco Mari commented on OAK-6058:
-------------------------------------
One example of problematic execution is represented by the following call stack
{noformat}
at com.google.common.io.ByteSource.contentEquals(ByteSource.java:301)
at
org.apache.jackrabbit.oak.plugins.memory.AbstractBlob.equal(AbstractBlob.java:67)
at
org.apache.jackrabbit.oak.plugins.segment.SegmentBlob.equals(SegmentBlob.java:228)
at com.google.common.base.Objects.equal(Objects.java:55)
at
org.apache.jackrabbit.oak.plugins.memory.AbstractPropertyState.equal(AbstractPropertyState.java:53)
at
org.apache.jackrabbit.oak.plugins.segment.SegmentPropertyState.equals(SegmentPropertyState.java:243)
at
org.apache.jackrabbit.oak.upgrade.nodestate.NodeStateCopier.copyProperties(NodeStateCopier.java:135)
{noformat}
In short, the content identity of the BLOB is {{null}} for one or both the
BLOBs. This forces
{{org.apache.jackrabbit.oak.plugins.memory.AbstractBlob#equal}} into accessing
the content of the BLOBs and perform a byte-to-byte comparison. In case of the
{{S3DataStore}}, this involves reading the content of the BLOBs from S3.
> Avoid accessing remote binaries when migration involves S3
> ----------------------------------------------------------
>
> Key: OAK-6058
> URL: https://issues.apache.org/jira/browse/OAK-6058
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: upgrade
> Reporter: Tomek Rękawek
> Assignee: Francesco Mari
> Priority: Major
>
> When migrating (sidegrade) a repository referencing the S3DataStore, we
> should avoid accessing the binaries themselves and use their identifiers
> instead.
> In particular:
> * it should be possible to copy a a nodestore referencing S3DataStore without
> accessing/configuring S3 at all (copy binaries by the references),
> * if the S3DataStore is configured for the migration and the destination
> already exists, the blob identifiers should be used in the equals() method,
> not the whole binary input stream.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)