[DOCS-7489] Modern drivers use write commands instead of OP_INSERT, OP_UPDATE, and OP_DELETE + getLastError Created: 22/Mar/16 Updated: 11/Jan/17 Resolved: 22/Apr/16 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | 01112017-cleanup |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Ravind Kumar (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 7 years, 42 weeks, 5 days ago |
| Description |
|
This page: https://docs.mongodb.org/manual/reference/mongodb-wire-protocol/#wp-request-opcodes should mention that, starting with MongoDB 2.6 and maxWireVersion 3, modern drivers use write commands for acknowledged writes, instead of OP_INSERT, OP_UPDATE, and OP_DELETE + getLastError. The legacy op codes are not exactly "deprecated" since they are not scheduled for removal, and most drivers will use them for unacknowledged writes. But they are "legacy" or "old-fashioned". |
| Comments |
| Comment by Githook User [ 22/Apr/16 ] | |
|
Author: {u'username': u'rkumar-mongo', u'name': u'ravind', u'email': u'ravind.kumar@10gen.com'}Message: Signed-off-by: kay <kay.kim@10gen.com> | |
| Comment by Githook User [ 22/Apr/16 ] | |
|
Author: {u'username': u'rkumar-mongo', u'name': u'ravind', u'email': u'ravind.kumar@10gen.com'}Message: Signed-off-by: kay <kay.kim@10gen.com> | |
| Comment by A. Jesse Jiryu Davis [ 30/Mar/16 ] | |
|
Exactly. If in Python you do "collection.insert(doc)", it no longer sends OP_INSERT and getLastError to the server, instead it sends
A third-party driver author pointed out to me on Twitter that you can't tell, from reading our wire protocol documentation, that the legacy opcodes are deprecated: |