[SERVER-20067] Shell should decide whether or not to use find/getMore commands based on on wire protocol version Created: 20/Aug/15  Updated: 07/Oct/15  Resolved: 30/Sep/15

Status: Closed
Project: Core Server
Component/s: Querying, Shell
Affects Version/s: None
Fix Version/s: 3.1.9

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-20294 Race condition in shard targeting log... Closed
depends on SERVER-20194 Enable new cursor manager path in mon... Closed
Related
is related to DRIVERS-211 New commands for find, getMore, and k... Closed
is related to SERVER-19572 Change shell default read mode to "co... Closed
Backwards Compatibility: Fully Compatible
Sprint: QuInt A (10/12/15)
Participants:

 Description   

The shell and drivers should detect based on wire version whether or not the server supports the find and getMore commands and then use the appropriate protocol for .find() operations.

The shell should support three values for the --readMode flag:

  1. compatibility: This is the default if no value is supplied for --readMode. This mode indicates that the shell should use the wire protocol version from the response to an isMaster command in order to determine which read protocol to use. If the server supports find/getMore commands, the shell should use "commands" readMode. Otherwise, the shell should degrade to legacy OP_QUERY/OP_GET_MORE reads.
  2. legacy: Forces the shell to use legacy OP_QUERY/OP_GET_MORE reads regardless of the wire protocol version.
  3. commands: Forces the shell to use find/getMore commands regardless of the wire protocol version.

You can also set the shell to use a particular readMode at runtime:

// Force the shell to use OP_QUERY/OP_GET_MORE reads.
db.getMongo().forceReadMode("legacy");
 
// Force the shell to use find/getMore commands.
db.getMongo().forceReadMode("commands");



 Comments   
Comment by Githook User [ 30/Sep/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-20067 SERVER-19572 set readMode in shell based on wire version

"compatibility" readMode now causes the shell to detect whether or not
to use find/getMore commands based on wire version. "commands" mode
forces use of the find/getMore commands, and "legacy" mode forces uses
of legacy OP_QUERY/OP_GET_MORE reads.

Also configures tests to force use of "commands" or "legacy" mode as
appropriate.
Branch: master
https://github.com/mongodb/mongo/commit/df2a33f9974950ebe484edfa29171cec53071b0a

Comment by Githook User [ 08/Sep/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-20067 remove sharded_limit_batchsize.js assertions depending on getmore log format
Branch: master
https://github.com/mongodb/mongo/commit/ae1fb1a88c99f3905413e2945a812007941864b0

Generated at Thu Feb 08 03:53:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.