diff options
Diffstat (limited to 'src/mongo/db/s')
29 files changed, 68 insertions, 68 deletions
diff --git a/src/mongo/db/s/check_sharding_index_command.cpp b/src/mongo/db/s/check_sharding_index_command.cpp index 9d3afd68c8e..04414dc9051 100644 --- a/src/mongo/db/s/check_sharding_index_command.cpp +++ b/src/mongo/db/s/check_sharding_index_command.cpp @@ -67,8 +67,8 @@ public: return false; } - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual void addRequiredPrivileges(const std::string& dbname, diff --git a/src/mongo/db/s/cleanup_orphaned_cmd.cpp b/src/mongo/db/s/cleanup_orphaned_cmd.cpp index afadefadbd4..9b338b0731e 100644 --- a/src/mongo/db/s/cleanup_orphaned_cmd.cpp +++ b/src/mongo/db/s/cleanup_orphaned_cmd.cpp @@ -164,8 +164,8 @@ class CleanupOrphanedCommand : public ErrmsgCommandDeprecated { public: CleanupOrphanedCommand() : ErrmsgCommandDeprecated("cleanupOrphaned") {} - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_add_shard_command.cpp b/src/mongo/db/s/config/configsvr_add_shard_command.cpp index c6354590788..834aa73ca74 100644 --- a/src/mongo/db/s/config/configsvr_add_shard_command.cpp +++ b/src/mongo/db/s/config/configsvr_add_shard_command.cpp @@ -65,8 +65,8 @@ public: "directly. Validates and adds a new shard to the cluster."; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp b/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp index 391aa557867..00c1af987cf 100644 --- a/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp +++ b/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp @@ -65,8 +65,8 @@ public: "directly. Validates and adds a new zone to the shard."; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp b/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp index 134032e61c4..4e9b80d82ea 100644 --- a/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp +++ b/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp @@ -91,8 +91,8 @@ public: return "should not be calling this directly"; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_control_balancer_command.cpp b/src/mongo/db/s/config/configsvr_control_balancer_command.cpp index 19b1fb0f263..1dc8c20f2c1 100644 --- a/src/mongo/db/s/config/configsvr_control_balancer_command.cpp +++ b/src/mongo/db/s/config/configsvr_control_balancer_command.cpp @@ -50,8 +50,8 @@ public: "directly. Controls the balancer state."; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_create_database_command.cpp b/src/mongo/db/s/config/configsvr_create_database_command.cpp index 556c6b5e0a2..797f76f5720 100644 --- a/src/mongo/db/s/config/configsvr_create_database_command.cpp +++ b/src/mongo/db/s/config/configsvr_create_database_command.cpp @@ -63,8 +63,8 @@ class ConfigSvrCreateDatabaseCommand : public BasicCommand { public: ConfigSvrCreateDatabaseCommand() : BasicCommand("_configsvrCreateDatabase") {} - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual bool adminOnly() const { diff --git a/src/mongo/db/s/config/configsvr_drop_collection_command.cpp b/src/mongo/db/s/config/configsvr_drop_collection_command.cpp index 7bd0bdbd541..fd2c5ca9b93 100644 --- a/src/mongo/db/s/config/configsvr_drop_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_drop_collection_command.cpp @@ -60,8 +60,8 @@ class ConfigSvrDropCollectionCommand : public BasicCommand { public: ConfigSvrDropCollectionCommand() : BasicCommand("_configsvrDropCollection") {} - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_drop_database_command.cpp b/src/mongo/db/s/config/configsvr_drop_database_command.cpp index cef41aa0d57..8a9d35df9e8 100644 --- a/src/mongo/db/s/config/configsvr_drop_database_command.cpp +++ b/src/mongo/db/s/config/configsvr_drop_database_command.cpp @@ -54,8 +54,8 @@ class ConfigSvrDropDatabaseCommand : public BasicCommand { public: ConfigSvrDropDatabaseCommand() : BasicCommand("_configsvrDropDatabase") {} - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp b/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp index 2cb4670595f..9bdbd5c5669 100644 --- a/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp +++ b/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp @@ -61,8 +61,8 @@ class ConfigSvrEnableShardingCommand : public BasicCommand { public: ConfigSvrEnableShardingCommand() : BasicCommand("_configsvrEnableSharding") {} - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual bool adminOnly() const { diff --git a/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp b/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp index 3fb76ac3056..37c32c6781a 100644 --- a/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp @@ -72,8 +72,8 @@ public: "not call directly. Receives, validates, and processes a MergeChunkRequest"; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_move_chunk_command.cpp b/src/mongo/db/s/config/configsvr_move_chunk_command.cpp index 904185e754a..f64994fcfba 100644 --- a/src/mongo/db/s/config/configsvr_move_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_move_chunk_command.cpp @@ -56,8 +56,8 @@ public: "directly. Requests the balancer to move or rebalance a single chunk."; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_move_primary_command.cpp b/src/mongo/db/s/config/configsvr_move_primary_command.cpp index 7f5b3a4169d..3ff60940242 100644 --- a/src/mongo/db/s/config/configsvr_move_primary_command.cpp +++ b/src/mongo/db/s/config/configsvr_move_primary_command.cpp @@ -68,8 +68,8 @@ class ConfigSvrMovePrimaryCommand : public BasicCommand { public: ConfigSvrMovePrimaryCommand() : BasicCommand("_configsvrMovePrimary") {} - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual bool adminOnly() const { diff --git a/src/mongo/db/s/config/configsvr_remove_shard_command.cpp b/src/mongo/db/s/config/configsvr_remove_shard_command.cpp index e8d089c9370..d55e81b4ba9 100644 --- a/src/mongo/db/s/config/configsvr_remove_shard_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_shard_command.cpp @@ -62,8 +62,8 @@ public: "directly. Removes a shard from the cluster."; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp b/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp index 7656550edff..9aa7f9285e2 100644 --- a/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp @@ -65,8 +65,8 @@ public: "directly. Validates and removes the shard from the zone."; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp index b602fed5350..63b6f00a48d 100644 --- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp @@ -706,8 +706,8 @@ public: return Status::OK(); } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp index b3f536871e5..4d66c7ffa8b 100644 --- a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp @@ -70,8 +70,8 @@ public: "not call directly. Receives, validates, and processes a SplitChunkRequest."; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp b/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp index ed83028907d..1742699b038 100644 --- a/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp +++ b/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp @@ -67,8 +67,8 @@ public: "directly. Validates and assigns a new range to a zone."; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp b/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp index 8c4732c1dea..36ea067ab63 100644 --- a/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp +++ b/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp @@ -70,8 +70,8 @@ public: return true; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool supportsWriteConcern(const BSONObj& cmd) const override { diff --git a/src/mongo/db/s/get_shard_version_command.cpp b/src/mongo/db/s/get_shard_version_command.cpp index 4ce02d070a6..2e580a669f8 100644 --- a/src/mongo/db/s/get_shard_version_command.cpp +++ b/src/mongo/db/s/get_shard_version_command.cpp @@ -58,8 +58,8 @@ public: return false; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/merge_chunks_command.cpp b/src/mongo/db/s/merge_chunks_command.cpp index 5b7e68fda56..d7a355e5f95 100644 --- a/src/mongo/db/s/merge_chunks_command.cpp +++ b/src/mongo/db/s/merge_chunks_command.cpp @@ -333,8 +333,8 @@ public: return true; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool supportsWriteConcern(const BSONObj& cmd) const override { diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp index 785a3309d22..a6f9b86e501 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp @@ -125,8 +125,8 @@ public: return false; } - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual bool adminOnly() const { @@ -187,8 +187,8 @@ public: return false; } - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual bool adminOnly() const { @@ -236,8 +236,8 @@ public: return false; } - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual bool adminOnly() const { diff --git a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp index d4b235f251f..36122f38c4f 100644 --- a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp +++ b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp @@ -63,8 +63,8 @@ public: return "internal"; } - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual bool adminOnly() const { @@ -163,8 +163,8 @@ public: return "internal"; } - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual bool adminOnly() const { @@ -201,8 +201,8 @@ public: return "internal"; } - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual bool adminOnly() const { @@ -247,8 +247,8 @@ public: return "internal"; } - virtual bool slaveOk() const { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } virtual bool adminOnly() const { diff --git a/src/mongo/db/s/move_chunk_command.cpp b/src/mongo/db/s/move_chunk_command.cpp index 5233290efc2..e1cb32cf925 100644 --- a/src/mongo/db/s/move_chunk_command.cpp +++ b/src/mongo/db/s/move_chunk_command.cpp @@ -80,8 +80,8 @@ public: return "should not be calling this directly"; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/set_shard_version_command.cpp b/src/mongo/db/s/set_shard_version_command.cpp index 7ddd6d2f6a1..1e4f734b16c 100644 --- a/src/mongo/db/s/set_shard_version_command.cpp +++ b/src/mongo/db/s/set_shard_version_command.cpp @@ -70,8 +70,8 @@ public: return true; } - bool slaveOk() const override { - return true; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kAlways; } virtual bool supportsWriteConcern(const BSONObj& cmd) const override { diff --git a/src/mongo/db/s/sharding_state_command.cpp b/src/mongo/db/s/sharding_state_command.cpp index 0e3aea8b652..6fc0887021a 100644 --- a/src/mongo/db/s/sharding_state_command.cpp +++ b/src/mongo/db/s/sharding_state_command.cpp @@ -48,8 +48,8 @@ public: return false; } - bool slaveOk() const override { - return true; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kAlways; } bool adminOnly() const override { diff --git a/src/mongo/db/s/split_chunk_command.cpp b/src/mongo/db/s/split_chunk_command.cpp index 8de8e6dc966..3c61c3b1498 100644 --- a/src/mongo/db/s/split_chunk_command.cpp +++ b/src/mongo/db/s/split_chunk_command.cpp @@ -68,8 +68,8 @@ public: return false; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } bool adminOnly() const override { diff --git a/src/mongo/db/s/split_vector_command.cpp b/src/mongo/db/s/split_vector_command.cpp index 4ac78111bf7..2ee8ad88d7c 100644 --- a/src/mongo/db/s/split_vector_command.cpp +++ b/src/mongo/db/s/split_vector_command.cpp @@ -49,8 +49,8 @@ public: return false; } - bool slaveOk() const override { - return false; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kNever; } std::string help() const override { diff --git a/src/mongo/db/s/unset_sharding_command.cpp b/src/mongo/db/s/unset_sharding_command.cpp index 5aae6e00a94..a6e6e61d970 100644 --- a/src/mongo/db/s/unset_sharding_command.cpp +++ b/src/mongo/db/s/unset_sharding_command.cpp @@ -60,8 +60,8 @@ public: return true; } - bool slaveOk() const override { - return true; + AllowedOnSecondary secondaryAllowed() const override { + return AllowedOnSecondary::kAlways; } void addRequiredPrivileges(const std::string& dbname, |