diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2017-10-04 17:43:27 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2017-10-13 16:23:30 -0400 |
commit | cbafd0521cd94a26ce790787d7d220c707132a48 (patch) | |
tree | 06da13b81e190378136c5c8124f65797c60b9ef6 /src/mongo/db/repl/replication_coordinator_impl.h | |
parent | 0f9d6085526921dd8edaffce827ffd07653ee4cd (diff) | |
download | mongo-cbafd0521cd94a26ce790787d7d220c707132a48.tar.gz |
SERVER-27160 Narrow race at startup between RSSync setting RECOVERING and BGSync setting ROLLBACK state
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_impl.h')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_impl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_impl.h b/src/mongo/db/repl/replication_coordinator_impl.h index f2d5bd12560..cae8ddd2af9 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.h +++ b/src/mongo/db/repl/replication_coordinator_impl.h @@ -1142,6 +1142,12 @@ private: */ int64_t _nextRandomInt64_inlock(int64_t limit); + /** + * Set follower mode. The caller should acquire the mutex first. + * The parameter *lock may be unlocked when this method returns. + */ + Status _setFollowerMode(stdx::unique_lock<stdx::mutex>* lock, const MemberState& newState); + // // All member variables are labeled with one of the following codes indicating the // synchronization rules for accessing them. |