summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl_index_build_state.h
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2019-06-19 00:38:36 -0400
committerXiangyu Yao <xiangyu.yao@mongodb.com>2019-06-28 15:03:00 -0400
commit2597e7fbe3c09683408b82b8b854023d6c2dbbf2 (patch)
tree8cfe4373adec95180cd2a1c37f428626bab94bfc /src/mongo/db/repl_index_build_state.h
parent47ee8f8cde1d1e116caf223458c15b4af10943d6 (diff)
downloadmongo-2597e7fbe3c09683408b82b8b854023d6c2dbbf2.tar.gz
SERVER-40717 Remove CollectionCatalogEntry and KVColletionCatalogEntry
Diffstat (limited to 'src/mongo/db/repl_index_build_state.h')
-rw-r--r--src/mongo/db/repl_index_build_state.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mongo/db/repl_index_build_state.h b/src/mongo/db/repl_index_build_state.h
index 9b44ee9e75a..cd50f2c0289 100644
--- a/src/mongo/db/repl_index_build_state.h
+++ b/src/mongo/db/repl_index_build_state.h
@@ -35,7 +35,6 @@
#include <vector>
#include "mongo/bson/bsonobj.h"
-#include "mongo/db/catalog/collection_catalog_entry.h"
#include "mongo/db/catalog/commit_quorum_options.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/namespace_string.h"
@@ -46,6 +45,22 @@
namespace mongo {
+// Indicates which protocol an index build is using.
+enum class IndexBuildProtocol {
+ /**
+ * Refers to the pre-FCV 4.2 index build protocol for building indexes in replica sets.
+ * Index builds must complete on the primary before replicating, and are not resumable in
+ * any scenario.
+ */
+ kSinglePhase,
+ /**
+ * Refers to the FCV 4.2 two-phase index build protocol for building indexes in replica
+ * sets. Indexes are built simultaneously on all nodes and are resumable during the draining
+ * phase.
+ */
+ kTwoPhase
+};
+
/**
* Tracks the cross replica set progress of a particular index build identified by a build UUID.
*