summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_builder.h
diff options
context:
space:
mode:
authorDaniel Gottlieb <daniel.gottlieb@mongodb.com>2018-04-06 15:14:55 -0400
committerDaniel Gottlieb <daniel.gottlieb@mongodb.com>2018-04-06 15:14:55 -0400
commita273f6f84cb29e31221f580b00905613d3f31330 (patch)
treec7a27153f34b965eb66b5a542ccc53ea39c1c93c /src/mongo/db/index_builder.h
parent1c0c35ba16ab6f03902db70f9e5750a74877e8a4 (diff)
downloadmongo-a273f6f84cb29e31221f580b00905613d3f31330.tar.gz
SERVER-34142: Convert background index builds to foreground during oplog recovery.
Diffstat (limited to 'src/mongo/db/index_builder.h')
-rw-r--r--src/mongo/db/index_builder.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/index_builder.h b/src/mongo/db/index_builder.h
index 02c11695eb8..1499b8cb816 100644
--- a/src/mongo/db/index_builder.h
+++ b/src/mongo/db/index_builder.h
@@ -62,10 +62,13 @@ class OperationContext;
* like inserts on system.indexes.
* The argument "relaxConstraints" specifies whether we should honor or ignore index constraints,
* The ignoring of constraints is for replication due to idempotency reasons.
+ * The argument "initIndexTs" specifies the timestamp to be used to make the initial catalog write.
*/
class IndexBuilder : public BackgroundJob {
public:
- IndexBuilder(const BSONObj& index, bool relaxConstraints);
+ IndexBuilder(const BSONObj& index,
+ bool relaxConstraints,
+ Timestamp initIndexTs = Timestamp::min());
virtual ~IndexBuilder();
virtual void run();
@@ -92,6 +95,7 @@ private:
const BSONObj _index;
const bool _relaxConstraints;
+ const Timestamp _initIndexTs;
std::string _name; // name of this builder, not related to the index
static AtomicUInt32 _indexBuildCount;
};