diff options
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r-- | src/mongo/db/commands.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h index f1e580b69f8..58cadbfb3ef 100644 --- a/src/mongo/db/commands.h +++ b/src/mongo/db/commands.h @@ -188,6 +188,7 @@ struct CommandHelpers { class Command { public: using CommandMap = StringMap<Command*>; + enum class AllowedOnSecondary { kAlways, kNever, kOptIn }; /** * Constructs a new command and causes it to be registered with the global commands list. It is @@ -262,17 +263,7 @@ public: return false; } - /* Return true if slaves are allowed to execute the command - */ - virtual bool slaveOk() const = 0; - - /** - * Return true if the client force a command to be run on a slave by - * turning on the 'slaveOk' option in the command query. - */ - virtual bool slaveOverrideOk() const { - return false; - } + virtual AllowedOnSecondary secondaryAllowed() const = 0; /** * Override and return fales if the command opcounters should not be incremented on |