summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_builds_coordinator_mongod.h
diff options
context:
space:
mode:
authorSuganthi Mani <suganthi.mani@mongodb.com>2020-03-17 16:10:42 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-03-18 18:35:43 +0000
commitb176fdbb1c3027bdd06721e51d5f07e3af0b3875 (patch)
treeebb9d1795525b536a3c876b8a68437f442adc678 /src/mongo/db/index_builds_coordinator_mongod.h
parent4870cb1a9dbefc1007a8d35f0be25d385e9f95f8 (diff)
downloadmongo-b176fdbb1c3027bdd06721e51d5f07e3af0b3875.tar.gz
SERVER-46917 Index builder on receiving commit/abort signal should cancel the active callback handle for the remote vote command request. And, callers who sets the index build commit/abort signal should also cancel the active remote vote command request callback handle for that signaling index build.
Diffstat (limited to 'src/mongo/db/index_builds_coordinator_mongod.h')
-rw-r--r--src/mongo/db/index_builds_coordinator_mongod.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/index_builds_coordinator_mongod.h b/src/mongo/db/index_builds_coordinator_mongod.h
index b7cc0d9458d..8dd2335dd83 100644
--- a/src/mongo/db/index_builds_coordinator_mongod.h
+++ b/src/mongo/db/index_builds_coordinator_mongod.h
@@ -88,6 +88,11 @@ public:
const std::vector<StringData>& indexNames,
const CommitQuorumOptions& newCommitQuorum) override;
+ void setSignalAndCancelVoteRequestCbkIfActive(WithLock ReplIndexBuildStateLk,
+ OperationContext* opCtx,
+ std::shared_ptr<ReplIndexBuildState> replState,
+ IndexBuildAction signal) override;
+
private:
/**
* Keeps track of the relevant replica set member states. Index builds are managed differently
@@ -134,10 +139,11 @@ private:
/**
* Signals index builder to commit.
*/
- void _sendCommitQuorumSatisfiedSignal(WithLock lk,
+ void _sendCommitQuorumSatisfiedSignal(WithLock ReplIndexBuildStateLk,
OperationContext* opCtx,
std::shared_ptr<ReplIndexBuildState> replState);
+
void _signalIfCommitQuorumIsSatisfied(OperationContext* opCtx,
std::shared_ptr<ReplIndexBuildState> replState) override;