[SERVER-2625] Mongo throws uncaught exception while perfoming findAndModify trying to return newly created document Created: 25/Feb/11  Updated: 07/Apr/23  Resolved: 13/Oct/13

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: 1.8.0-rc0
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: chris rozacki Assignee: Scott Hernandez (Inactive)
Resolution: Duplicate Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-1351 GLE upserted _id field should always ... Closed
Operating System: ALL
Participants:

 Description   

Windows 2008 Server 64

When _id is compound object then and Mongo does actual insert :

> db.coll.findAndModify({"query":

{ "_id.a": "default" }

, "update": { "$inc":

{ "value": 1 }

}, "new": true, "upsert": true })

exception: assertion ../bson/bsonobjbuilder.h:119", but the document is created

Then when we repeat the operation it results with proper document, and "value" is incremented.

When _id is simple type everything is ok: Mongo returns document

Again, clean database and we issue then same command but "new":false everything seems fine.



 Comments   
Comment by Peter Magnusson [ 11/Oct/11 ]

Adding the group discussion that lead up to this http://groups.google.com/group/mongodb-user/browse_thread/thread/9c88463b412b32d/1c648c34f89133c2

Comment by Mathias Stearn [ 28/Feb/11 ]

Setting to same fix_version as dependency

Comment by Mathias Stearn [ 26/Feb/11 ]

This is due to http://jira.mongodb.org/browse/SERVER-1351

Generated at Thu Feb 08 03:00:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.