Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1381

shell should be smart with shard clusters and replica sets

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • None
    • Fully Compatible

      (1) the mongo shell prompt should tell one more about contect when connected. for example if connected to a mongod and it is a member of a replica set, the prompt should tell you the server's state. something like

      primary>

      or

      secondary>

      or

      arbiter>

      If connecting from the shell to an entire set, it will be important that the user know which node to which it is currently active. So this could be something like

      myset:sf1:primary>

      where myset is the set name, sf1 host name to which we are connected, and primary the state of sf1 currently.

      likewise with sharding similar things. if connected to a mongos, we should somehow indicate that. maybe

      s>

      if connected to a mongo in a particular shard, indicate that

      shard3:sf1>

      if connected to a config server, indicate that

      cfg:sf1>

      not for 1.6 but useful later.

      also we can make this configurable – we can have a prompt() js function that returns a string, with the above being a default.

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            dwight@mongodb.com Dwight Merriman
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: