Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-745

Updating an existing document causes size to double

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.7.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Ubuntu 14.04.01 x86_64
      TokuMX 1.5 mongoDB 2.4.10

      Description

      Attempting to overwrite a 9mb document with either save or update causes an OperationFailure: BSONObj size exception:

          doc = db.collection.find_one({'_id': '53e0...'})
          db.collection.save(doc)
       
          pymongo.errors.OperationFailure: BSONObj size: 18798961 (0x71D91E01) is invalid. Size must be between 0 and 16793600(16MB) First element: op: "u"
       
       
          doc = db.collection.find_one({'_id': '53e0...'})
          db.collection.update({'_id': _id}, doc)
       
          pymongo.errors.OperationFailure: BSONObj size: 18798961 (0x71D91E01) is invalid. Size must be between 0 and 16793600(16MB) First element: op: "u"

      I am not manipulating the document in any way- simply retrieving it then saving it. If I remove the document before I save it the operation is successful:

          doc = db.collection.find_one({'_id': '53e0...'})
          db.collection.remove({'_id': doc['_id']})
          db.collection.save(doc)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: