From fd6971a17400c37ea6bf6c54ef2c04c25201416d Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Fri, 13 Jan 2017 17:54:21 -0500 Subject: SERVER-27677 CollectionBulkLoaderImpl::_releaseResources ensures that a Client is available when destroying MultiIndexBlock --- src/mongo/db/repl/collection_bulk_loader_impl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mongo/db/repl/collection_bulk_loader_impl.cpp') diff --git a/src/mongo/db/repl/collection_bulk_loader_impl.cpp b/src/mongo/db/repl/collection_bulk_loader_impl.cpp index 226e5bcb898..ffc6b176032 100644 --- a/src/mongo/db/repl/collection_bulk_loader_impl.cpp +++ b/src/mongo/db/repl/collection_bulk_loader_impl.cpp @@ -225,10 +225,14 @@ Status CollectionBulkLoaderImpl::commit() { void CollectionBulkLoaderImpl::_releaseResources() { if (_secondaryIndexesBlock) { + // A valid Client is required to drop unfinished indexes. + Client::initThreadIfNotAlready(); _secondaryIndexesBlock.reset(); } if (_idIndexBlock) { + // A valid Client is required to drop unfinished indexes. + Client::initThreadIfNotAlready(); _idIndexBlock.reset(); } -- cgit v1.2.1