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

Data loss after $set

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.6.5
    • Affects Version/s: 1.6.2
    • Component/s: None
    • None
    • Environment:
      Windows + Linux
    • ALL

      To reproduce the bug, I run these 3 commands:

      db.bugtest.insert(

      { _id: ObjectId("4c8d156f6709000000001176")}

      );
      db.bugtest.update(

      { _id: ObjectId("4c8d156f6709000000001176") }

      , { $set:

      { "babca304b2c79a6801200000": "Test 01" }

      });
      db.bugtest.update(

      { _id: ObjectId("4c8d156f6709000000001176") }

      , { $set:

      { "babca304b2c79a6801210000": "Test 02" }

      });

      I expect this object:

      { _id: ObjectId("4c8d156f6709000000001176"), "babca304b2c79a6801200000": "Test 01", "babca304b2c79a6801210000": "Test 02"}

      Instead, "babca304b2c79a6801200000": "Test 01" is missing:

      { "_id" : ObjectId("4c8d156f6709000000001176"), "babca304b2c79a6801210000" : "Test 02" }

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            heiko Heiko Weible
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: