jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-1932) TarMK compaction can create mixed segments
Date Mon, 07 Jul 2014 14:22:34 GMT

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

Jukka Zitting commented on OAK-1932:

bq. I beg to differ  it could happen on normal compact operations too.

If you unroll the loop, the sequence of calls is something like this:

Compactor compactor = new Compactor(...);
compactor.compact(EMPTY_NODE, B);
compactor.compact(A, B);
compactor.compact(B, C);

Since we use the same {{Compactor}} instance, the end result is the same regardless of whether
a single {{NodeBuilder}} is used for all {{compact()}} calls (like it used to be) or a new
NodeBuilder is instantiated for each call (which is what the patch did). The attached test
case uses a different call pattern, for which the class originally wasn't designed for.

Anyway, as mentioned above, the change does make the {{Compactor}} easier to reuse for other
cases, so it's clearly an improvement.

> TarMK compaction can create mixed segments
> ------------------------------------------
>                 Key: OAK-1932
>                 URL: https://issues.apache.org/jira/browse/OAK-1932
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, segmentmk
>    Affects Versions: 1.0.1
>            Reporter: Jukka Zitting
>            Assignee: Jukka Zitting
>         Attachments: Compactor.java.patch, CompactorTest.java.patch
> As described in http://markmail.org/message/ujkqdlthudaortxf, commits that occur while
the compaction operation is running can make the compacted segments contain references to
older data segments, which prevents old data from being reclaimed during cleanup.

This message was sent by Atlassian JIRA

View raw message