diff options
author | Kevin Pulo <kevin.pulo@mongodb.com> | 2018-11-01 21:17:00 +0000 |
---|---|---|
committer | Kevin Pulo <kevin.pulo@mongodb.com> | 2018-11-14 01:38:39 +0000 |
commit | c2cc425b9d2b23eead06ecbfd996375e47c81baa (patch) | |
tree | ca24166f5800b1cbee8254148b26c41a9c9f0195 /src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp | |
parent | 20ca44d3ab1dce18c71ff726fcab3591b809137a (diff) | |
download | mongo-c2cc425b9d2b23eead06ecbfd996375e47c81baa.tar.gz |
SERVER-36411 include shard id/name in changelog/actionlog entries
Diffstat (limited to 'src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp')
-rw-r--r-- | src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp index ac56b8e9d14..76b1ba10087 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp @@ -57,6 +57,7 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/s/add_shard_cmd_gen.h" #include "mongo/db/s/add_shard_util.h" +#include "mongo/db/s/sharding_logging.h" #include "mongo/db/s/type_shard_identity.h" #include "mongo/db/wire_version.h" #include "mongo/executor/task_executor.h" @@ -759,7 +760,7 @@ StatusWith<std::string> ShardingCatalogManager::addShard( shardDetails.append("name", shardType.getName()); shardDetails.append("host", shardConnectionString.toString()); - Grid::get(opCtx)->catalogClient()->logChange( + ShardingLogging::get(opCtx)->logChange( opCtx, "addShard", "", shardDetails.obj(), ShardingCatalogClient::kMajorityWriteConcern); // Ensure the added shard is visible to this process. @@ -812,7 +813,7 @@ StatusWith<ShardDrainingStatus> ShardingCatalogManager::removeShard(OperationCon log() << "going to start draining shard: " << name; // Record start in changelog - const Status logStatus = Grid::get(opCtx)->catalogClient()->logChangeChecked( + const Status logStatus = ShardingLogging::get(opCtx)->logChangeChecked( opCtx, "removeShard.start", "", @@ -884,7 +885,7 @@ StatusWith<ShardDrainingStatus> ShardingCatalogManager::removeShard(OperationCon shardRegistry->reload(opCtx); // Record finish in changelog - Grid::get(opCtx)->catalogClient()->logChange( + ShardingLogging::get(opCtx)->logChange( opCtx, "removeShard", "", BSON("shard" << name), ShardingCatalogClient::kLocalWriteConcern); return ShardDrainingStatus::COMPLETED; |