[SERVER-21119] Better behavior for shell with readMode "commands" and find() when switching to an older server Created: 26/Oct/15 Updated: 01/Feb/16 Resolved: 01/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Shell |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Joanna Cheng | Assignee: | Jonathan Reams |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Build C (11/20/15), Build F (01/29/16) | ||||||||
| Participants: | |||||||||
| Description |
|
If someone is downgrading, they could easily hit this scenario. In addition to the error in the shell, there's also a scary looking stack trace in the logs when you run this for the first time
Subsequent find() commands give the same message in the shell, but don't generate another stack trace Workarounds
It would be nice if the shell could figure this out for itself. |
| Comments |
| Comment by Jonathan Reams [ 01/Feb/16 ] | ||||||||||||||||||||||||
|
Since this relates to compatibility between RC's that have already gone GA, and because it doesn't actually cause a failure, just a warning message in the logs - I'm closing this. | ||||||||||||||||||||||||
| Comment by Jonathan Abrahams [ 16/Nov/15 ] | ||||||||||||||||||||||||
|
mongo RC-2/mongod RC-3 compatibility issue uncovered belongs in | ||||||||||||||||||||||||
| Comment by David Storch [ 16/Nov/15 ] | ||||||||||||||||||||||||
|
Got it. We made a performance enhancement under | ||||||||||||||||||||||||
| Comment by Jonathan Abrahams [ 16/Nov/15 ] | ||||||||||||||||||||||||
|
Steps performed on OSX:
| ||||||||||||||||||||||||
| Comment by David Storch [ 16/Nov/15 ] | ||||||||||||||||||||||||
|
jonathan.abrahams, can you provide repro details for the behavior you report? I just did the following
This fails for me, as before, with the "cannot translate opcode" error. This happens because the shell is attempting to send a find command using the OP_COMMAND protocol, which is not recognized by a 3.0.7 server. I still think that the resolution of this ticket will be to provide better behavior under | ||||||||||||||||||||||||
| Comment by Jonathan Abrahams [ 16/Nov/15 ] | ||||||||||||||||||||||||
|
I am unable to connect to mongod (master, v3.2.0-rc2-189-g442fdaa) from mongo shell (3.2.0-rc2) with this error:
I do not think this is an improvement ticket, but now a bug. | ||||||||||||||||||||||||
| Comment by David Storch [ 26/Oct/15 ] | ||||||||||||||||||||||||
|
Right now, if a particular readMode is not forced, the shell auto-detects readMode based on the wire version. The result of resolving the readMode is cached for the lifetime of the shell process. This is why the shell currently keeps using readMode "commands" even after making a new connection to an older server that doesn't support the find/getMore commands. Under |