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

Cannot upsert 16MB document from shell

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Works as Designed
    • Affects Version/s: 2.5.5
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
      None
    • Operating System:
      ALL

      Description

      Using the MongoDB 2.4.8 shell and OP_UPDATE, I can create a nearly-16MB document by upserting:

      > var sixteen = '';
      > while (sixteen.length < (16 * 1024 * 1024 - 30)) { var x = (sixteen += 'a'); }
      > sixteen.length
      16777186
      > db.collection.update({key: 1}, {$set: {x: sixteen}}, true)
      >

      But in nightly shell build bffe6421 with the 'update' command, this fails:

      > sixteen.length
      16777186
      > db.collection.update({key: 1}, {$set: {x: sixteen}}, true)
      2014-02-04T09:52:35.515-0500 Error: Converting from JavaScript to BSON failed: Object size 16777256 exceeds limit of 16777216 bytes. at src/mongo/shell/batch_api.js:347

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-platform DO NOT USE - Backlog - Platform Team
              Reporter:
              jesse A. Jesse Jiryu Davis
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: