Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35220

Updating a document with dotted notation failed with PathNotViable if array is sufficiently large

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 3.6.4
    • None
    • Querying, Write Ops
    • None
    • ALL
    • Query 2018-06-18

    Description

      1. Attempting to update an array using dotted notation failed with a PathNotViable error (code 28) if the array is sufficiently large.

      Attached is a jstest that creates an empty array, then attempts to insert 10 new elements into the array using dotted notation such as {$set: {"array.0.content": "x"}}: PathNotViable.js

       The test will fail if we attempt to insert 10 elements at once. It will succeed when we try to insert fewer than that, e.g. 9 elements.

      The error message printed in the console is as follows:

      Cannot create field 'content' in element {: null}
      WriteResult({
        "nMatched": 0,
        "nUpserted": 0,
        "nModified": 0,
        "writeError": {
          "code": 28,
          "errmsg": "Cannot create field 'content' in element {: null}"
        }
      })
      

       This also happens when inserting the same number of elements using Pymongo.

      Attachments

        Issue Links

          Activity

            People

              charlie.swanson@mongodb.com Charlie Swanson
              kevin.adistambha@mongodb.com Kevin Adistambha
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: