diff options
author | Louis Williams <louis.williams@mongodb.com> | 2019-01-18 11:35:53 -0500 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2019-01-18 16:06:59 -0500 |
commit | 615e8ff0cecdced8fbac8559a9abaa17b5e12a79 (patch) | |
tree | 201678b773f6e6fdc4a57038802bf4c72558b952 /src/mongo/db/index_builder.h | |
parent | aad17aeba520f5c421716cb2d740057be96ce61a (diff) | |
download | mongo-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.h | 9 |
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; |