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

remove CommandInvocation::secondaryAllowed

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.7.6
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Platforms 2018-04-23

      The slaveOk,slaveOverrideOk properties of each command are informed by the "secondaryAllowed" result enum. For some commands the correct answer would depend on what the request payload is. So when "listCommands" prints out an array of all the commands and their "slaveOk", "slaveOverrideOK" bool properties, it has no way of telling the truth right now.

      This is user-facing.

      So now we have a secondaryAllowed virtual function on Command and another on CommandInvocation. The one on Command gives a Request-insensitive answer, and the one on CommandInvocation gives a Request-sensitive answer. For the majority of commands these will give the same answer and CommandInvocation's default implementation will be to call its Command's secondaryAllowed member.

      This ticket only covers removing secondaryAllowed from CommandInvocation, with the understanding that listCommands may have to be addressed at some point.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: