You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2014/12/13 16:28:13 UTC

[jira] [Commented] (OAK-2192) Concurrent commit during compaction results in mixed segments

    [ https://issues.apache.org/jira/browse/OAK-2192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14245381#comment-14245381 ] 

Alex Parvulescu commented on OAK-2192:
--------------------------------------

looks great! awesome job!

minor feedback:
 - I like the callback idea, looks neat! one thing I'm worried about is using the SegmentStore & friends outside of an OSGi env. The proper wrapping of the callback into the semaphore lock will not work then, right?

 - I'm confused by the following lines (not introduced, but only surfaced by your patch) in the SegmentWriter (line 1096)
{code}
} else if (!(before instanceof SegmentNodeState) || store.containsSegment(before.getRecordId().getSegmentId())) {
{code}

 - last one for me personally, I introduced a bug in the SegmentNodeStoreService class trying to fix a potential deadlock in the initialization in relation to the 'standby' flag. If you start with false, then change to true it will deadlock because of the fat synchronized block. My fix basically broke the lazy init of the custom blob store, such is OSGi support :)

bq. Better usage of enums in CompactionStrategy
thanks for cleaning that 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, segmentmk
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>              Labels: compaction, gc
>             Fix For: 1.0.9
>
>         Attachments: OAK-2192-2.patch, OAK-2192-poc-fix.patch, OAK-2192-possible-test.patch, OAK-2192-v10-branch-1.0.patch, OAK-2192-v10.patch, OAK-2192-v2.patch, OAK-2192-v3.patch, OAK-2192-v4.patch, OAK-2192-v5.patch, OAK-2192-v6.patch, OAK-2192-v7.patch, OAK-2192-v8-branch-1.0.patch, OAK-2192-v8.patch, OAK-2192-v9-branch-1.0.patch, OAK-2192-v9.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)