[SERVER-7197] getLastError should piggy back on the insert/update/upsert operations Created: 28/Sep/12 Updated: 15/Feb/13 Resolved: 28/Sep/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Performance |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Inder Sabharwal | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Participants: |
| Description |
|
All operations to save data to mongodb should also let the getLastError parameters on the original request. This will prevent an extra network roundtrip to fetch the GLE results. This is extremely important to improve the latency of the save operations by 10s/100s of microseconds. |
| Comments |
| Comment by Inder Sabharwal [ 29/Sep/12 ] |
|
Disregard the file attachment - it was meant for another issue. |
| Comment by Scott Hernandez (Inactive) [ 28/Sep/12 ] |
|
It is hard to say without having it, but I wouldn't expect much of a change if we put it in one operation – it will help with mongos and routers/proxies to include the write-concern/intention with the write operation. |
| Comment by Inder Sabharwal [ 28/Sep/12 ] |
|
I was talking in reference to the Java Driver. I see that it does do that. I am not sure, though, if having getLastError as part of the wire protocol will have any improvement on insert times. If it does not, then you can close this issue. |
| Comment by Scott Hernandez (Inactive) [ 28/Sep/12 ] |
|
Many of the drivers do this so it is sent in a single packet over the network. If you find one which doesn't please create an issue for that language. There are discussions about changing the wire protocol to combine these into a single operation as well. |