[
https://issues.apache.org/jira/browse/OAK-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Dürig updated OAK-4307:
-------------------------------
Attachment: OAK_4307_2.patch
Alternative patch [^OAK_4307_2.pach]
I broke {{SegmentWriter.SegmentWriteOperation#writeStream}} during my work on
OAK-3348 where I added this de-duplication functionality for the individual
blocks of a stream. This is needed for compaction: a new generation of a stream
rewrites the list of block ids but still links to the blocks of the existing
stream.
With this patch I restore the previous semantics of that method and check in
{{SegmentWriter.SegmentWriteOperation#writeStream}} whether we need to
de-duplicate (i.e. during compaction) or not.
> SegmentWriter saves references to external blobs
> ------------------------------------------------
>
> Key: OAK-4307
> URL: https://issues.apache.org/jira/browse/OAK-4307
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: segment-next
> Reporter: Tomek Rękawek
> Assignee: Tomek Rękawek
> Fix For: 1.6
>
> Attachments: OAK-4307.patch, OAK_4307_2.patch
>
>
> The new {{SegmentWriteOperation#internalWriteStream}} method checks whether
> the input stream to write is a {{SegmentStream}}. If it's, writer will reuse
> existing block ids, rather than storing the whole stream.
> It should also check whether the blocks in {{SegmentStream}} comes from the
> same tracker / segment store. Otherwise this will create invalid references
> if someone invokes the {{internalWriteStream()}} method with a
> {{SegmentStream}} created externally.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)