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

Updating an existing document causes size to double

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

      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)
      

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            dgel231 David Gelvin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: