diff options
Diffstat (limited to 'src/mongo/db/s/catalog_cache_loader_mock.cpp')
-rw-r--r-- | src/mongo/db/s/catalog_cache_loader_mock.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/db/s/catalog_cache_loader_mock.cpp b/src/mongo/db/s/catalog_cache_loader_mock.cpp index 89ea61c3697..9b9b52870cc 100644 --- a/src/mongo/db/s/catalog_cache_loader_mock.cpp +++ b/src/mongo/db/s/catalog_cache_loader_mock.cpp @@ -99,9 +99,7 @@ std::shared_ptr<Notification<void>> CatalogCacheLoaderMock::getChunksSince( const NamespaceString& nss, ChunkVersion version, GetChunksSinceCallbackFn callbackFn) { auto notify = std::make_shared<Notification<void>>(); - _threadPool.schedule([ this, notify, callbackFn ](auto status) noexcept { - invariant(status); - + uassertStatusOK(_threadPool.schedule([ this, notify, callbackFn ]() noexcept { auto opCtx = Client::getCurrent()->makeOperationContext(); auto swCollAndChunks = [&]() -> StatusWith<CollectionAndChangedChunks> { @@ -123,7 +121,7 @@ std::shared_ptr<Notification<void>> CatalogCacheLoaderMock::getChunksSince( callbackFn(opCtx.get(), std::move(swCollAndChunks)); notify->set(); - }); + })); return notify; } |