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 "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2013/07/09 14:23:48 UTC

[jira] [Commented] (OAK-786) Fall back to pessimism

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

Marcel Reutegger commented on OAK-786:
--------------------------------------

See also ConcurrentAddIT in oak-jcr for a test where SegmentMK is currently ignored because of this issue.
                
> Fall back to pessimism
> ----------------------
>
>                 Key: OAK-786
>                 URL: https://issues.apache.org/jira/browse/OAK-786
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: core
>            Reporter: Jukka Zitting
>            Priority: Minor
>
> By default the SegmentMK uses optimistic locking when committing changes to a given journal. This works well most of the time, but there a few scenarios when this strategy will fail. For example:
> # A large batch operation while other smaller changes are being committed.
> # Lots of concurrent changes being committed against the same journal.
> In such cases optimistic locking will lead to some changes being delayed indefinitely, whereas pessimistic locking can guarantee eventual completion of all operations at the cost of potentially significantly reduced throughput. See http://markmail.org/message/dl3semmp577bnqoi for related discussion.
> As a hybrid solution that attempts to combine the best aspects of both optimistic and pessimistic locking, we should make the SegmentMK fall back to pessimism if optimistic locking fails after some N attempts or X seconds.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira