summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/collection_to_capped.cpp
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2018-01-31 14:17:57 -0500
committerBilly Donahue <billy.donahue@mongodb.com>2018-01-31 14:42:00 -0500
commit40e43aca44d4dd251b7a1d0ce44c7cb49dcda93f (patch)
tree64d9c1fdd03afa929238bd6818fcb901daa40e2f /src/mongo/db/commands/collection_to_capped.cpp
parentd75cb425fbc3cf4b569eb1722c3f8abec45654a2 (diff)
downloadmongo-40e43aca44d4dd251b7a1d0ce44c7cb49dcda93f.tar.gz
SERVER-32958 unrevert "SERVER-32958 slaveOk,slaveOverrideOk replacement"
w/fix: update a new command to secondaryAllowed This reverts commit d75cb425fbc3cf4b569eb1722c3f8abec45654a2.
Diffstat (limited to 'src/mongo/db/commands/collection_to_capped.cpp')
-rw-r--r--src/mongo/db/commands/collection_to_capped.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/commands/collection_to_capped.cpp b/src/mongo/db/commands/collection_to_capped.cpp
index 14a3bf3f00e..56dad067123 100644
--- a/src/mongo/db/commands/collection_to_capped.cpp
+++ b/src/mongo/db/commands/collection_to_capped.cpp
@@ -52,8 +52,8 @@ using std::stringstream;
class CmdCloneCollectionAsCapped : public ErrmsgCommandDeprecated {
public:
CmdCloneCollectionAsCapped() : ErrmsgCommandDeprecated("cloneCollectionAsCapped") {}
- virtual bool slaveOk() const {
- return false;
+ AllowedOnSecondary secondaryAllowed() const override {
+ return AllowedOnSecondary::kNever;
}
virtual bool supportsWriteConcern(const BSONObj& cmd) const override {
return true;
@@ -151,8 +151,8 @@ public:
class CmdConvertToCapped : public ErrmsgCommandDeprecated {
public:
CmdConvertToCapped() : ErrmsgCommandDeprecated("convertToCapped") {}
- virtual bool slaveOk() const {
- return false;
+ AllowedOnSecondary secondaryAllowed() const override {
+ return AllowedOnSecondary::kNever;
}
virtual bool supportsWriteConcern(const BSONObj& cmd) const override {
return true;