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

Implement Server Selection Spec's changes for runCommand and command helpers

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • Labels:
    • Server Tooling & Methods

      If the shell is committed to matching the drivers Server Selection Spec, it needs to be updated to match behavior we decided on for drivers last year. See this section of the Server Selection Spec:

      https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#use-of-read-preferences-with-commands

      "runCommand" MUST use the default readPreference, "primary", regardless of previous calls to setReadPrefs(). "runCommand" SHOULD also accept an argument that allows the user to set an explicit read preference.

      Command-specific helpers like "count", "getIndexes", "aggregate", and so on need to be reviewed and updated to match the spec's point number 3 that describes how helper methods behave.

      Please ask david.golden, me, or any of the advisors on the spec for questions and justifications.

            Assignee:
            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: