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

Tomek Rękawek edited comment on OAK-3559 at 1/5/16 9:46 AM:
------------------------------------------------------------

I updated the patch with following changes:

1. Lock keys are ordered before being acquired - the implementation was moved 
to a separate issue OAK-3833.
2. The multi-lock acquire was moved to the bulkUpdate(), so the lock scope is 
smaller (only the currently processed batch).
3. Added an extra condition (modCount not exists) for the new documents to 
avoid race condition as in the previous comment.
4. Created two concurrent test cases in BulkCreateOrUpdateTest.
5. Extracted the size()>2 check to a separate {{if}} and added a comment.


was (Author: tomek.rekawek):
I updated the patch with following changes:

1. Lock keys are ordered before being acquired - the implementation was moved 
to the NodeDocumentLocks.
2. The multi-lock acquire was moved to the bulkUpdate(), so the lock scope is 
smaller (only the currently processed batch).
3. Added an extra condition (modCount not exists) for the new documents to 
avoid race condition as in the previous comment.
4. Created two concurrent test cases in BulkCreateOrUpdateTest.
5. Extracted the size()>2 check to a separate {{if}} and added a comment.

> Bulk document updates in MongoDocumentStore
> -------------------------------------------
>
>                 Key: OAK-3559
>                 URL: https://issues.apache.org/jira/browse/OAK-3559
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: mongomk
>            Reporter: Tomek Rękawek
>            Assignee: Marcel Reutegger
>             Fix For: 1.4
>
>         Attachments: OAK-3559.patch
>
>
> Using the MongoDB [Bulk 
> API|https://docs.mongodb.org/manual/reference/method/Bulk/#Bulk] implement 
> the [batch version of createOrUpdate method|OAK-3662].



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

Reply via email to