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

Rishabh Daim commented on OAK-10213:
------------------------------------

{quote}Do we have data that suggests there are many such documents with deleted 
properties and performance is a concern?
{quote}
I did a query on one of the customer's env to found out that the total no. of 
documents with deleted properties.

The deleted properties count in respect to total documents varies by huge 
margin with ranges between 1% to as high as 35%.

> Add new api in DocumentStore to handle bulk findAndUpdate operations
> --------------------------------------------------------------------
>
>                 Key: OAK-10213
>                 URL: https://issues.apache.org/jira/browse/OAK-10213
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Rishabh Daim
>            Assignee: Rishabh Daim
>            Priority: Major
>
> Currently, we only provide support to update 1 document using 
> [findAndUpdate|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java#L348]
>  with conditions.
>  
> For my ticket OAK-10199, I need to update multiple documents. However, none 
> of the existing APIs fit my use case.
> Using 
> [findAndUpdate|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java#L348]
>  would be very inefficient in case of updating multiple documents.
>  
> Hence I propose adding a new API that can update multiple documents using 
> [bulkUpdate|https://www.mongodb.com/docs/drivers/java/sync/current/usage-examples/bulkWrite/]
>  of Mongo on similar lines to the 
> [createOrUpdate|https://github.com/apache/jackrabbit-oak/blob/trunk/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java#L321]
>  API.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to