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 "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2015/11/05 05:08:27 UTC

[jira] [Comment Edited] (OAK-3587) SegmentNodeStore should ensure that checkpoint is issued in case of frequent writes by taking an exclusive lock

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

Chetan Mehrotra edited comment on OAK-3587 at 11/5/15 4:07 AM:
---------------------------------------------------------------

bq. finally I did not add a dedicated InterruptedException catch clause, I don't see why is needed to differentiate as such, catching Exception should suffice

In case of {{InterruptedException}} some special handling is required [1]. You would need to restore the interrupt flag on current thread as we are not throwing the exception back

bq. reduced the config options, only left the lockWaitTime, by default at 10s

Would it be possible to move this to {{SegmentNodeStoreBuilder}} and avoid adding yet another system property ;)

[1] http://stackoverflow.com/questions/3976344/handling-interruptedexception-in-java


was (Author: chetanm):
bq. finally I did not add a dedicated InterruptedException catch clause, I don't see why is needed to differentiate as such, catching Exception should suffice

In case of {{InterruptedException}} some special handling is required [1]. You would need to restore the interrupt flag on current thread as we are not throwing the exception back

[1] http://stackoverflow.com/questions/3976344/handling-interruptedexception-in-java

bq. reduced the config options, only left the lockWaitTime, by default at 10s

Would it be possible to move this to {{SegmentNodeStoreBuilder}} and avoid adding yet another system property ;)

> SegmentNodeStore should ensure that checkpoint is issued in case of frequent writes by taking an exclusive lock
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: OAK-3587
>                 URL: https://issues.apache.org/jira/browse/OAK-3587
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segmentmk
>            Reporter: Chetan Mehrotra
>            Assignee: Alex Parvulescu
>             Fix For: 1.3.10, 1.2.8, 1.0.24
>
>         Attachments: OAK-3587-v2.patch, OAK-3587.patch
>
>
> AsyncIndexUpdate proceeds with an indexing cycle only if the NodeStore issues a checkpoint. A NodeStore implementation can issue a checkpoint but for it to be valid the caller must fetch NodeState for that checkpoint. If a non null NodeState is found it indicates that checkpoint is valid.
> With SegmentNodeStore its possible under high write conditions that checkpoint issues is not valid as it only attempts an optimistic lock. This can cause unbounded delays in acquiring a valid checkpoint and thus cause delay in AsyncIndexUpdate cycle and that causes effect on queries which rely on such async indexes.
> Instead of doing an optimistic lock it should attempt to acquire an exclusive lock. See [1] for some more details on checkpoint behaviour
> [1] http://markmail.org/thread/c7zo3zju7e2hakg4



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