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 "Michael Dürig (JIRA)" <ji...@apache.org> on 2016/03/11 15:36:02 UTC

[jira] [Commented] (OAK-4054) FileStore.containsSegment returns alway true (almost)

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

Michael Dürig commented on OAK-4054:
------------------------------------

FTR, I had to fix this one while working on OAK-3348. See https://github.com/mduerig/jackrabbit-oak/commit/e9c341244f333428ad7353d2a1a3e04b1f2aa4d0

Interestingly enough I had to tweak the code in other places as those relied on the current behaviour of the method! 

> FileStore.containsSegment returns alway true (almost)
> -----------------------------------------------------
>
>                 Key: OAK-4054
>                 URL: https://issues.apache.org/jira/browse/OAK-4054
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segmentmk
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>            Priority: Critical
>              Labels: compaction, gc, stability
>             Fix For: 1.6
>
>
> {{FileStore.containsSegment()}} looks [funky|https://github.com/mduerig/jackrabbit-oak/blob/36cb3bf6e5078e3afa75581fb789eeca7b5df2e2/oak-segment/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/FileStore.java#L1197-L1197]. This "optimisation" causes it to always return {{true}}. 
> {{containsSegment}} is used for deduplication and revision gc. The current implementation causes {{SNFE}} exceptions once gc is effective (as I experienced while working on OAK-3348). 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)