diff options
Diffstat (limited to 'src/mongo/db/s/move_primary_coordinator.cpp')
-rw-r--r-- | src/mongo/db/s/move_primary_coordinator.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/mongo/db/s/move_primary_coordinator.cpp b/src/mongo/db/s/move_primary_coordinator.cpp index 32d7a6af9bf..863a4c17b9d 100644 --- a/src/mongo/db/s/move_primary_coordinator.cpp +++ b/src/mongo/db/s/move_primary_coordinator.cpp @@ -46,24 +46,10 @@ namespace mongo { -boost::optional<BSONObj> MovePrimaryCoordinator::reportForCurrentOp( - MongoProcessInterface::CurrentOpConnectionsMode connMode, - MongoProcessInterface::CurrentOpSessionsMode sessionMode) noexcept { - BSONObjBuilder cmdBob; - if (const auto& optComment = getForwardableOpMetadata().getComment()) { - cmdBob.append(optComment.get().firstElement()); - } - cmdBob.append("request", BSON(_doc.kToShardIdFieldName << _doc.getToShardId())); - - BSONObjBuilder bob; - bob.append("type", "op"); - bob.append("desc", "MovePrimaryCoordinator"); - bob.append("op", "command"); - bob.append("ns", nss().toString()); - bob.append("command", cmdBob.obj()); - bob.append("active", true); - return bob.obj(); -} +void MovePrimaryCoordinator::appendCommandInfo(BSONObjBuilder* cmdInfoBuilder) const { + stdx::lock_guard lk{_docMutex}; + cmdInfoBuilder->append("request", BSON(_doc.kToShardIdFieldName << _doc.getToShardId())); +}; void MovePrimaryCoordinator::checkIfOptionsConflict(const BSONObj& doc) const { // If we have two shard collections on the same namespace, then the arguments must be the same. |