summaryrefslogtreecommitdiff
path: root/src/mongo/db/index/index_build_interceptor.h
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2019-01-16 14:24:04 -0500
committerLouis Williams <louis.williams@mongodb.com>2019-01-17 16:09:19 -0500
commita47e42994c06fc500bdcd0bf53d99e199ad5117c (patch)
treedd2882b878fca64fe8d693bf95855618a7f7da89 /src/mongo/db/index/index_build_interceptor.h
parentd764e1b6346726fc2e9259ba294d029d531ff38e (diff)
downloadmongo-a47e42994c06fc500bdcd0bf53d99e199ad5117c.tar.gz
SERVER-38378 Hybrid builds should yield locks and check for interrupts while draining
Diffstat (limited to 'src/mongo/db/index/index_build_interceptor.h')
-rw-r--r--src/mongo/db/index/index_build_interceptor.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/index/index_build_interceptor.h b/src/mongo/db/index/index_build_interceptor.h
index 9842e999489..c3213827e62 100644
--- a/src/mongo/db/index/index_build_interceptor.h
+++ b/src/mongo/db/index/index_build_interceptor.h
@@ -118,6 +118,12 @@ private:
int64_t* const keysInserted,
int64_t* const keysDeleted);
+ /**
+ * Yield lock manager locks, but only when holding intent locks. Does nothing otherwise. If this
+ * yields locks, it will also abandon the current storage engine snapshot.
+ */
+ void _tryYield(OperationContext*);
+
// The entry for the index that is being built.
IndexCatalogEntry* _indexCatalogEntry;