summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_builder.h
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2019-01-18 11:35:53 -0500
committerLouis Williams <louis.williams@mongodb.com>2019-01-18 16:06:59 -0500
commit615e8ff0cecdced8fbac8559a9abaa17b5e12a79 (patch)
tree201678b773f6e6fdc4a57038802bf4c72558b952 /src/mongo/db/index_builder.h
parentaad17aeba520f5c421716cb2d740057be96ce61a (diff)
downloadmongo-615e8ff0cecdced8fbac8559a9abaa17b5e12a79.tar.gz
SERVER-39077 IndexBuilder should always relock database on exceptions
Diffstat (limited to 'src/mongo/db/index_builder.h')
-rw-r--r--src/mongo/db/index_builder.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mongo/db/index_builder.h b/src/mongo/db/index_builder.h
index 478083d6174..b18f47b524e 100644
--- a/src/mongo/db/index_builder.h
+++ b/src/mongo/db/index_builder.h
@@ -34,6 +34,7 @@
#include "mongo/base/status.h"
#include "mongo/db/catalog/index_catalog.h"
+#include "mongo/db/catalog/multi_index_block.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/jsobj.h"
#include "mongo/platform/atomic_word.h"
@@ -107,9 +108,15 @@ public:
static bool canBuildInBackground();
private:
+ Status _buildAndHandleErrors(OperationContext* opCtx,
+ Database* db,
+ bool buildInBackground,
+ Lock::DBLock* dbLock) const;
+
Status _build(OperationContext* opCtx,
- Database* db,
bool buildInBackground,
+ Collection* coll,
+ MultiIndexBlock& indexer,
Lock::DBLock* dbLock) const;
const BSONObj _index;
const IndexConstraints _indexConstraints;