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 "Rishabh Daim (Jira)" <ji...@apache.org> on 2023/05/30 13:37:00 UTC

[jira] [Updated] (OAK-10213) Add new api in DocumentStore to handle bulk findAndUpdate operations

     [ https://issues.apache.org/jira/browse/OAK-10213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rishabh Daim updated OAK-10213:
-------------------------------
    Fix Version/s: 1.54.0

> 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
>             Fix For: 1.54.0
>
>
> 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)