Jukka Zitting created OAK-786:
---------------------------------

             Summary: 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

Reply via email to