diff options
author | Judah Schvimer <judah@mongodb.com> | 2017-01-20 17:05:17 -0500 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2017-01-23 10:51:31 -0500 |
commit | a89275be8ed3401c3f00357b90720fcee94e3f79 (patch) | |
tree | b84e3f83336f49a7e70fda0964d2385af673bf42 | |
parent | 45887bb958437fd5f5f033683a3a7a900616c449 (diff) | |
download | mongo-a89275be8ed3401c3f00357b90720fcee94e3f79.tar.gz |
SERVER-27783 removed SyncSourceFeedback lock around preparing ReplSetUpdatePosition commands
-rw-r--r-- | src/mongo/db/repl/sync_source_feedback.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mongo/db/repl/sync_source_feedback.cpp b/src/mongo/db/repl/sync_source_feedback.cpp index 43b84f45e38..beb73bebbdd 100644 --- a/src/mongo/db/repl/sync_source_feedback.cpp +++ b/src/mongo/db/repl/sync_source_feedback.cpp @@ -113,17 +113,14 @@ Status SyncSourceFeedback::updateUpstream(OperationContext* txn, bool oldStyle) return Status::OK(); } BSONObjBuilder cmd; - { - stdx::unique_lock<stdx::mutex> lock(_mtx); - // The command could not be created, likely because this node was removed from the set. - if (!oldStyle) { - if (!replCoord->prepareReplSetUpdatePositionCommand(&cmd)) { - return Status::OK(); - } - } else { - if (!replCoord->prepareOldReplSetUpdatePositionCommand(&cmd)) { - return Status::OK(); - } + // The command could not be created, likely because this node was removed from the set. + if (!oldStyle) { + if (!replCoord->prepareReplSetUpdatePositionCommand(&cmd)) { + return Status::OK(); + } + } else { + if (!replCoord->prepareOldReplSetUpdatePositionCommand(&cmd)) { + return Status::OK(); } } BSONObj res; |