diff options
author | Dianna Hohensee <dianna.hohensee@10gen.com> | 2016-07-29 14:37:22 -0400 |
---|---|---|
committer | Dianna Hohensee <dianna.hohensee@10gen.com> | 2016-08-24 11:48:59 -0400 |
commit | 3de973e1fd98473fbf1605e2d6039214aa15b2a4 (patch) | |
tree | 47df21978e84da9afc39140e325f630189fc4286 /src/mongo/db/s/sharding_server_status.cpp | |
parent | 30e9b7dba2c530074f1758e43324d1c082ec45ce (diff) | |
download | mongo-3de973e1fd98473fbf1605e2d6039214aa15b2a4.tar.gz |
SERVER-22671 adding migration status to serverStatus' sharding section
Diffstat (limited to 'src/mongo/db/s/sharding_server_status.cpp')
-rw-r--r-- | src/mongo/db/s/sharding_server_status.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/s/sharding_server_status.cpp b/src/mongo/db/s/sharding_server_status.cpp index 4cb8c4f047e..8f58e24600b 100644 --- a/src/mongo/db/s/sharding_server_status.cpp +++ b/src/mongo/db/s/sharding_server_status.cpp @@ -55,6 +55,14 @@ public: shardingState->getConfigServer(txn).toString()); Grid::get(txn)->configOpTime().append(&result, "lastSeenConfigServerOpTime"); + + // Get a migration status report if a migration is active for which this is the source + // shard. ShardingState::getActiveMigrationStatusReport will take an IS lock on the + // namespace of the active migration if there is one that is active. + BSONObj migrationStatus = ShardingState::get(txn)->getActiveMigrationStatusReport(txn); + if (!migrationStatus.isEmpty()) { + result.append("migrations", migrationStatus); + } } return result.obj(); |