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 "Tomek Rękawek (JIRA)" <ji...@apache.org> on 2016/05/04 13:20:13 UTC

[jira] [Commented] (OAK-4345) Bulk update constructs malformed query

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

Tomek Rękawek commented on OAK-4345:
------------------------------------

Patch LGTMT. Thanks for fixing this.

> Bulk update constructs malformed query
> --------------------------------------
>
>                 Key: OAK-4345
>                 URL: https://issues.apache.org/jira/browse/OAK-4345
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, mongomk
>    Affects Versions: 1.4, 1.4.1, 1.4.2
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>              Labels: candidate_oak_1_4
>             Fix For: 1.6
>
>         Attachments: OAK-4345.patch
>
>
> MongoDocumentStore constructs a malformed query for bulk update of new documents. The query is:
> {noformat}
> { "_id" : { "$not" : { "$exists" : "_modCount"}}}
> {noformat}
> while it actually should be:
> {noformat}
> { "_id" : "<some-id>" , "_modCount" : { "$exists" : false}}
> {noformat}
> It doesn't seem to do any harm in a non-sharded deployment. The query does not mistakenly match documents.
> However there is a problem when MongoDB is shareded and the calls are routed through mongos. The bulk update become very slow (more than a factor of 10). I assume mongos cannot figure out where to route the bulk update and resorts to executing the updates individually.



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