-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Write Ops
-
None
-
ALL
Test:
c = db.c; c.drop(); c.findAndModify( { query:{ _id:1 }, update:{ _id:2 }, upsert:true, new:true } );
Output:
Fri Aug 31 15:11:22 [conn2] queryModified: { _id: 1.0 } Fri Aug 31 15:11:22 [conn2] test.c Assertion failure Helpers::findOne( ns.c_str() , queryModified , doc ) src/mongo/db/commands/find_and_modify.cpp 187 0x108c49ea5 0x108e6e45b 0x108cc3329 0x108b24681 0x108b251d9 0x108b202c3 0x1087627ae 0x108764ca4 0x108765990 0x108e22fa5 0x108e23a7b 0x108cb3dc2 0x108cb8cc0 0x108668387 0x108ad4da3 0x108ad6400 0x108ad6462 0x108ad648d 0x1089883e9 0x10a8db8bf 0 mongod 0x0000000108c49ea5 _ZN5mongo15printStackTraceERSo + 37 1 mongod 0x0000000108e6e45b _ZN5mongo10logContextEPKc + 123 2 mongod 0x0000000108cc3329 _ZN5mongo12verifyFailedEPKcS1_j + 409 3 mongod 0x0000000108b24681 _ZN5mongo16CmdFindAndModify17runNoDirectClientERKSsRKNS_7BSONObjES5_S5_bbbRNS_14BSONObjBuilderE + 3915 4 mongod 0x0000000108b251d9 _ZN5mongo16CmdFindAndModify17runNoDirectClientERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 1025 5 mongod 0x0000000108b202c3 _ZN5mongo16CmdFindAndModify3runERKSsRNS_7BSONObjEiRSsRNS_14BSONObjBuilderEb + 425 6 mongod 0x00000001087627ae _ZN5mongo12_execCommandEPNS_7CommandERKSsRNS_7BSONObjEiRNS_14BSONObjBuilderEb + 142 7 mongod 0x0000000108764ca4 _ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb + 6516 8 mongod 0x0000000108765990 _ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 1472 9 mongod 0x0000000108e22fa5 _ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_11_BufBuilderINS_16TrivialAllocatorEEERNS_14BSONObjBuilderEbi + 117 10 mongod 0x0000000108e23a7b _ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ + 1595 11 mongod 0x0000000108cb3dc2 _ZN5mongoL13receivedQueryERNS_6ClientERNS_10DbResponseERNS_7MessageE + 418 12 mongod 0x0000000108cb8cc0 _ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE + 1136 13 mongod 0x0000000108668387 _ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE + 261 14 mongod 0x0000000108ad4da3 _ZN5mongo3pms9threadRunEPNS_13MessagingPortE + 2275 15 mongod 0x0000000108ad6400 _ZN5boost3_bi5list1INS0_5valueIPN5mongo13MessagingPortEEEEclIPFvS5_ENS0_5list0EEEvNS0_4typeIvEERT_RT0_i + 78 16 mongod 0x0000000108ad6462 _ZN5boost3_bi6bind_tIvPFvPN5mongo13MessagingPortEENS0_5list1INS0_5valueIS4_EEEEEclEv + 92 17 mongod 0x0000000108ad648d _ZN5boost6detail11thread_dataINS_3_bi6bind_tIvPFvPN5mongo13MessagingPortEENS2_5list1INS2_5valueIS6_EEEEEEE3runEv + 37 18 mongod 0x00000001089883e9 thread_proxy + 169 19 libsystem_c.dylib 0x000000010a8db8bf _pthread_start + 335 Fri Aug 31 15:11:22 [conn2] end connection 127.0.0.1:49733 (0 connections now open)
- is duplicated by
-
SERVER-4157 findAndModify throws exception when _id is in the update document and "new":true
- Closed
-
SERVER-4163 findAndModify returns an empty document with "new" : true flag if the _id value in the query document does not match the _id value in the update document.
- Closed
- is related to
-
SERVER-6909 verify assertion when new version of a document is requested that does not match dotted field expression of original query; excessive logging
- Closed
- related to
-
SERVER-14286 Additional tests for updates and findAndModifys that touch _id
- Closed
-
SERVER-18076 Upsert rejected with error if _id assigned to in $setOnInsert and _id equality match specified in query predicate
- Closed