[
https://issues.apache.org/jira/browse/OAK-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Dürig updated OAK-2192:
-------------------------------
Attachment: OAK-2192-poc-fix.patch
POC patch making {{CompactionAndCleanupTest#testMixedSegments}} pass. There are
two additional source for mixed segments:
# Doing a {{FileStore.setHead()}} in {{FileStore.compact()}} while a
{{SegmentNodeStore.merge()}} is in progress.
# Flushing the {{SegmentTracker}}'s {{SegmentWriter}} too early or too late. It
needs to be flushed atomically with the {{SegmentWriter}} of the compactor.
See my comments in the patch for additional details. The patch intentionally
breaks all levels of encapsulation as I wanted to concentrate on the bare
effects first. Once we agree that it fixes the right thing, we need to look
into cleaning it up.
> Concurrent commit during compaction results in mixed segments
> -------------------------------------------------------------
>
> Key: OAK-2192
> URL: https://issues.apache.org/jira/browse/OAK-2192
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Reporter: Michael Dürig
> Assignee: Michael Dürig
> Labels: compaction, gc
> Attachments: OAK-2192-2.patch, OAK-2192-poc-fix.patch,
> OAK-2192-possible-test.patch, OAK-2192.patch
>
>
> Changes that are committed during a segment store compaction run will be
> compacted on top of the already compacted changes. However the compactor uses
> the wrong before state in this case. Instead of compacting against the
> compacted before state it uses the un-compacted before state. The resulting
> state will thus contain references to un-compacted state, making those not
> eligible for later clean up.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)