[SERVER-18075] Behavior of Mongo update is different in 2.4 vs 2.6 Created: 15/Apr/15 Updated: 15/Apr/15 Resolved: 15/Apr/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 2.6.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Rajesh Sharma | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | run following in 2.4 vs 2.6 and see the difference. This is creating issue in our code due to upgrade. db.books.update( , ) In 2.4 if the document is missing then it is creating the following document. , In 2.6 it is creating the following in same condition , |
||||||||
| Participants: | |||||||||
| Description |
|
Behavior of Mongo update is different in 2.4 vs 2.6. In our case _id was null so in 2.4 it was creating multiple document and which was correct behavior. in 2.6 the behavior changed and the Id is becoming null which is creating nullpointer exception and later all upsert are only updating that document instead of inserting. Steps to Reproduce db.books.update( , ) In 2.4 if the document is missing then it is creating the following document. , In 2.6 it is creating the following in same condition , |
| Comments |
| Comment by J Rassi [ 15/Apr/15 ] |
|
Hi, The 2.4 behavior has been classified as a bug that was fixed for the 2.6.0 production release in There's no way to precisely emulate the previous behavior in current versions of the server, unfortunately. However, this will be possible once I'm closing this ticket as a duplicate of ~ Jason Rassi |