[SERVER-23281] Silent failure when inserting mongo object with an object field as the _id Created: 22/Mar/16  Updated: 22/Mar/16  Resolved: 22/Mar/16

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Billy Tetrud Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

I accidentally inserted documents in the database with an object as the _id field. I noticed this person reported a similar problem a few years ago: http://stackoverflow.com/questions/24618380/mongodb-inserts-silently-fail

If I try to do a find all query {}, I can't find the object inserted, but no error was returned. I'm on Mongo 3.0.

When an index sees a non-object-id object in the indexed field, does it just skip over it rather than erroring? Even if this was the case, I'd expect to find the object when searching with an empty query.



 Comments   
Comment by Kelsey Schubert [ 22/Mar/16 ]

Hi fresheneesz,

I'm glad you were able to identify the issue - I'm closing this ticket as you requested.

Kind regards,
Thomas

Comment by Billy Tetrud [ 22/Mar/16 ]

Nevermind - I found out it was an issue with my code. Please close

Generated at Thu Feb 08 04:02:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.