summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl_index_build_state.h
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2019-09-20 22:50:23 +0000
committerevergreen <evergreen@mongodb.com>2019-09-20 22:50:23 +0000
commit43b3d71af00922f7ebc1958f54ad39f0622a7c97 (patch)
tree29819547ec243b683d0f3563822bd18c316a990c /src/mongo/db/repl_index_build_state.h
parent3dc398ef9f7a973521a7f484ee9f8309aae478c2 (diff)
downloadmongo-43b3d71af00922f7ebc1958f54ad39f0622a7c97.tar.gz
SERVER-39239 add fields to ReplIndexBuildState to support commitIndexBuild and abortIndexBuild
Diffstat (limited to 'src/mongo/db/repl_index_build_state.h')
-rw-r--r--src/mongo/db/repl_index_build_state.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/repl_index_build_state.h b/src/mongo/db/repl_index_build_state.h
index fbd2639e2b9..f5e14beb4cc 100644
--- a/src/mongo/db/repl_index_build_state.h
+++ b/src/mongo/db/repl_index_build_state.h
@@ -35,6 +35,7 @@
#include <vector>
#include "mongo/bson/bsonobj.h"
+#include "mongo/bson/timestamp.h"
#include "mongo/db/catalog/commit_quorum_options.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/namespace_string.h"
@@ -126,10 +127,15 @@ struct ReplIndexBuildState {
// SharedSemiFuture(s).
SharedPromise<IndexCatalogStats> sharedPromise;
+ // Set to true on a secondary on receipt of a commitIndexBuild oplog entry.
+ bool isCommitReady = false;
+ Timestamp commitTimestamp;
+
// There is a period of time where the index build is registered on the coordinator, but an
// index builder does not yet exist. Since a signal cannot be set on the index builder at that
// time, it must be saved here.
bool aborted = false;
+ Timestamp abortTimestamp;
std::string abortReason = "";
// The coordinator for the index build will wait upon this when awaiting an external signal,