From a47e42994c06fc500bdcd0bf53d99e199ad5117c Mon Sep 17 00:00:00 2001 From: Louis Williams Date: Wed, 16 Jan 2019 14:24:04 -0500 Subject: SERVER-38378 Hybrid builds should yield locks and check for interrupts while draining --- src/mongo/db/index/index_build_interceptor.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mongo/db/index/index_build_interceptor.h') 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; -- cgit v1.2.1