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:36:00 UTC
[jira] [Comment Edited] (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:comment-tabpanel&focusedCommentId=17727527#comment-17727527 ]
Rishabh Daim edited comment on OAK-10213 at 5/30/23 1:35 PM:
-------------------------------------------------------------
After multiple rounds of review, I merged the [PR|https://github.com/apache/jackrabbit-oak/pull/920] into the trunk.
was (Author: JIRAUSER299730):
After multiple rounds of review, I merged the PR[PR|https://github.com/apache/jackrabbit-oak/pull/920] into the trunk.
> 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)