[SERVER-20640] Shell should not issue special isMaster commands for feature detection Created: 25/Sep/15 Updated: 17/Nov/15 Resolved: 05/Nov/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0-rc3 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | 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 B (10/30/15), Build C (11/20/15) | ||||||||
| Participants: | |||||||||
| Description |
|
Currently the shell may issue multiple isMaster commands on the same connection for separate purposes. For instance, it might send one is master response to detect whether the server supports write commands and another to detect whether the server supports the find/getMore/killCursors commands. If the isMaster command was issued once when a connection is opened, these wire protocol version checks would not involve several round trips to the server. |
| Comments |
| Comment by Githook User [ 05/Nov/15 ] |
|
Author: {u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}Message: |
| Comment by David Storch [ 25/Sep/15 ] |
|
Changing the title to reflect that this is about avoiding isMaster round trips specifically for feature detection (i.e. "Does the remote node support the write commands?"). |
| Comment by J Rassi [ 25/Sep/15 ] |
|
I don't believe that you can cache the isMaster response for the entire lifetime a shell connection. I was under the impression that, in interactive mode, the shell sends isMaster after every statement because it needs to know if the server "is a master", in order to generate the prompt (e.g. to tell whether to switch the "rs:PRIMARY>" prompt to "rs:SECONDARY>"). |