diff options
author | Louis Williams <louis.williams@mongodb.com> | 2019-01-16 14:24:04 -0500 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2019-01-17 16:09:19 -0500 |
commit | a47e42994c06fc500bdcd0bf53d99e199ad5117c (patch) | |
tree | dd2882b878fca64fe8d693bf95855618a7f7da89 /src/mongo/db/index/index_build_interceptor.h | |
parent | d764e1b6346726fc2e9259ba294d029d531ff38e (diff) | |
download | mongo-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.h | 6 |
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; |