diff options
author | Benety Goh <benety@mongodb.com> | 2019-07-11 10:35:21 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2019-07-11 10:35:36 -0400 |
commit | adab6702bc9869557c14eb8b0e888c6e854f4593 (patch) | |
tree | bd809cf4c9adc085903de2a1eddf7df9bd490fae | |
parent | b9272e3fc9c41aff5e8ba8a0d641eed278fcd92f (diff) | |
download | mongo-adab6702bc9869557c14eb8b0e888c6e854f4593.tar.gz |
SERVER-38667 remove unused replication state notification functions from IndexBuildsCoordinator
-rw-r--r-- | src/mongo/db/index_builds_coordinator.h | 7 | ||||
-rw-r--r-- | src/mongo/db/index_builds_coordinator_mongod.cpp | 15 | ||||
-rw-r--r-- | src/mongo/db/index_builds_coordinator_mongod.h | 10 | ||||
-rw-r--r-- | src/mongo/embedded/index_builds_coordinator_embedded.cpp | 12 | ||||
-rw-r--r-- | src/mongo/embedded/index_builds_coordinator_embedded.h | 3 |
5 files changed, 0 insertions, 47 deletions
diff --git a/src/mongo/db/index_builds_coordinator.h b/src/mongo/db/index_builds_coordinator.h index defcbd5310a..2c57b01e6d5 100644 --- a/src/mongo/db/index_builds_coordinator.h +++ b/src/mongo/db/index_builds_coordinator.h @@ -204,13 +204,6 @@ public: Future<void> abortIndexBuildByBuildUUID(const UUID& buildUUID, const std::string& reason); /** - * Signal replica set member state changes that affect cross replica set index building. - */ - virtual void signalChangeToPrimaryMode() = 0; - virtual void signalChangeToSecondaryMode() = 0; - virtual void signalChangeToInitialSyncMode() = 0; - - /** * TODO: This is not yet implemented. */ virtual Status voteCommitIndexBuild(const UUID& buildUUID, const HostAndPort& hostAndPort) = 0; diff --git a/src/mongo/db/index_builds_coordinator_mongod.cpp b/src/mongo/db/index_builds_coordinator_mongod.cpp index b0bea23afa9..4fb8274a640 100644 --- a/src/mongo/db/index_builds_coordinator_mongod.cpp +++ b/src/mongo/db/index_builds_coordinator_mongod.cpp @@ -216,21 +216,6 @@ Status IndexBuildsCoordinatorMongod::commitIndexBuild(OperationContext* opCtx, return Status::OK(); } -void IndexBuildsCoordinatorMongod::signalChangeToPrimaryMode() { - stdx::unique_lock<stdx::mutex> lk(_mutex); - _replMode = ReplState::Primary; -} - -void IndexBuildsCoordinatorMongod::signalChangeToSecondaryMode() { - stdx::unique_lock<stdx::mutex> lk(_mutex); - _replMode = ReplState::Secondary; -} - -void IndexBuildsCoordinatorMongod::signalChangeToInitialSyncMode() { - stdx::unique_lock<stdx::mutex> lk(_mutex); - _replMode = ReplState::InitialSync; -} - Status IndexBuildsCoordinatorMongod::voteCommitIndexBuild(const UUID& buildUUID, const HostAndPort& hostAndPort) { // TODO: not yet implemented. diff --git a/src/mongo/db/index_builds_coordinator_mongod.h b/src/mongo/db/index_builds_coordinator_mongod.h index 03b5884cce3..e7d5df355d4 100644 --- a/src/mongo/db/index_builds_coordinator_mongod.h +++ b/src/mongo/db/index_builds_coordinator_mongod.h @@ -84,10 +84,6 @@ public: const std::vector<BSONObj>& specs, const UUID& buildUUID) override; - void signalChangeToPrimaryMode() override; - void signalChangeToSecondaryMode() override; - void signalChangeToInitialSyncMode() override; - Status voteCommitIndexBuild(const UUID& buildUUID, const HostAndPort& hostAndPort) override; Status setCommitQuorum(OperationContext* opCtx, @@ -133,12 +129,6 @@ private: */ void _refreshReplStateFromPersisted(OperationContext* opCtx, const UUID& buildUUID); - // Replication hooks will call into the Coordinator to update this on relevant state - // transitions. The Coordinator will then use the setting to inform how index builds are run. - // Index builds have different inter node communication responsibilities and error checking - // requirements depending on the replica set member's state. - ReplState _replMode = ReplState::Secondary; - // Thread pool on which index builds are run. ThreadPool _threadPool; }; diff --git a/src/mongo/embedded/index_builds_coordinator_embedded.cpp b/src/mongo/embedded/index_builds_coordinator_embedded.cpp index 110838b6dcc..860e762b493 100644 --- a/src/mongo/embedded/index_builds_coordinator_embedded.cpp +++ b/src/mongo/embedded/index_builds_coordinator_embedded.cpp @@ -85,18 +85,6 @@ Status IndexBuildsCoordinatorEmbedded::commitIndexBuild(OperationContext* opCtx, MONGO_UNREACHABLE; } -void IndexBuildsCoordinatorEmbedded::signalChangeToPrimaryMode() { - MONGO_UNREACHABLE; -} - -void IndexBuildsCoordinatorEmbedded::signalChangeToSecondaryMode() { - MONGO_UNREACHABLE; -} - -void IndexBuildsCoordinatorEmbedded::signalChangeToInitialSyncMode() { - MONGO_UNREACHABLE; -} - Status IndexBuildsCoordinatorEmbedded::voteCommitIndexBuild(const UUID& buildUUID, const HostAndPort& hostAndPort) { MONGO_UNREACHABLE; diff --git a/src/mongo/embedded/index_builds_coordinator_embedded.h b/src/mongo/embedded/index_builds_coordinator_embedded.h index 96de739be87..5e974caf39b 100644 --- a/src/mongo/embedded/index_builds_coordinator_embedded.h +++ b/src/mongo/embedded/index_builds_coordinator_embedded.h @@ -70,9 +70,6 @@ public: Status commitIndexBuild(OperationContext* opCtx, const std::vector<BSONObj>& specs, const UUID& buildUUID) override; - void signalChangeToPrimaryMode() override; - void signalChangeToSecondaryMode() override; - void signalChangeToInitialSyncMode() override; Status voteCommitIndexBuild(const UUID& buildUUID, const HostAndPort& hostAndPort) override; Status setCommitQuorum(OperationContext* opCtx, const NamespaceString& nss, |