Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-4345

Bulk update constructs malformed query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4, 1.4.1, 1.4.2
    • 1.4.6, 1.5.2, 1.6.0
    • core, mongomk
    • None

    Description

      MongoDocumentStore constructs a malformed query for bulk update of new documents. The query is:

      { "_id" : { "$not" : { "$exists" : "_modCount"}}}
      

      while it actually should be:

      { "_id" : "<some-id>" , "_modCount" : { "$exists" : false}}
      

      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.

      Attachments

        1. OAK-4345.patch
          0.8 kB
          Marcel Reutegger

        Issue Links

          Activity

            People

              mreutegg Marcel Reutegger
              mreutegg Marcel Reutegger
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: