[SERVER-22637] OP_INSERT can fail when inserted document contains no _id Created: 16/Feb/16 Updated: 17/Feb/16 Resolved: 17/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 3.2.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Jeffrey Yemin | 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: | Standalone 3.2.1 mongod server. I used a document that looks like this:
I had to hack the Java driver to not automatically add an _id and to actually send an OP_INSERT to a 3.2 driver. |
||||||||
| Participants: | |||||||||
| Description |
|
Calling getlasterror after inserting a 262144-byte document without an _id via OP_INSERT fails with code 1 and the following message:
A 262143-byte document succeeds, and so does a 3.0 server. I don't see this as particularly severe because most drivers will automatically add an _id field to all documents before insertion. |