summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_builds_coordinator.h
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2019-02-14 16:15:50 -0500
committerGregory Wlodarek <gregory.wlodarek@mongodb.com>2019-02-22 21:12:50 -0500
commit0f2da7fb758f12bd64c6c7891d455a53e1ab1d89 (patch)
treed21c7a099c802971bea6059041da5b3b15365079 /src/mongo/db/index_builds_coordinator.h
parent4253bddd476f19fb6af295323acc9d5af15da598 (diff)
downloadmongo-0f2da7fb758f12bd64c6c7891d455a53e1ab1d89.tar.gz
SERVER-37954 Thread commitQuorum through the createIndexes command into the Coordinator
Diffstat (limited to 'src/mongo/db/index_builds_coordinator.h')
-rw-r--r--src/mongo/db/index_builds_coordinator.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mongo/db/index_builds_coordinator.h b/src/mongo/db/index_builds_coordinator.h
index 7aa563790c9..cb7117376e0 100644
--- a/src/mongo/db/index_builds_coordinator.h
+++ b/src/mongo/db/index_builds_coordinator.h
@@ -68,6 +68,13 @@ class ServiceContext;
class IndexBuildsCoordinator {
public:
/**
+ * Contains additional information required by 'startIndexBuild()'.
+ */
+ struct IndexBuildOptions {
+ boost::optional<CommitQuorumOptions> commitQuorum;
+ };
+
+ /**
* Invariants that there are no index builds in-progress.
*/
virtual ~IndexBuildsCoordinator();
@@ -104,7 +111,8 @@ public:
CollectionUUID collectionUUID,
const std::vector<BSONObj>& specs,
const UUID& buildUUID,
- IndexBuildProtocol protocol) = 0;
+ IndexBuildProtocol protocol,
+ IndexBuildOptions indexBuildOptions) = 0;
/**
* Sets up the in-memory and persisted state of the index build.
@@ -345,7 +353,8 @@ protected:
CollectionUUID collectionUUID,
const std::vector<BSONObj>& specs,
const UUID& buildUUID,
- IndexBuildProtocol protocol);
+ IndexBuildProtocol protocol,
+ boost::optional<CommitQuorumOptions> commitQuorum);
/**
* Runs the index build on the caller thread. Handles unregistering the index build and setting