diff options
author | Benety Goh <benety@mongodb.com> | 2019-04-03 00:53:07 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2019-04-03 00:53:07 -0400 |
commit | 6c2bd4b1be257ba7b9335e40c2af18ff25b7fcdd (patch) | |
tree | e5e7d931989f7bdacf515e9f53f29d6a3837c6ee /src/mongo/s | |
parent | ddae7b803ed19bf4bc1af1dcf0f8d4e44575736c (diff) | |
download | mongo-6c2bd4b1be257ba7b9335e40c2af18ff25b7fcdd.tar.gz |
Revert "SERVER-39965 OutOfLineExecutor Tasks are now unique_function(Status)"
This reverts commit 04ea1d46eb6c4c78e19409f120ae2e61f2a35204.
Diffstat (limited to 'src/mongo/s')
-rw-r--r-- | src/mongo/s/config_server_catalog_cache_loader.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mongo/s/config_server_catalog_cache_loader.cpp b/src/mongo/s/config_server_catalog_cache_loader.cpp index 0776a4c3626..977c709eaa3 100644 --- a/src/mongo/s/config_server_catalog_cache_loader.cpp +++ b/src/mongo/s/config_server_catalog_cache_loader.cpp @@ -176,9 +176,7 @@ std::shared_ptr<Notification<void>> ConfigServerCatalogCacheLoader::getChunksSin const NamespaceString& nss, ChunkVersion version, GetChunksSinceCallbackFn callbackFn) { auto notify = std::make_shared<Notification<void>>(); - _threadPool.schedule([ nss, version, notify, callbackFn ](auto status) noexcept { - invariant(status); - + uassertStatusOK(_threadPool.schedule([ nss, version, notify, callbackFn ]() noexcept { auto opCtx = Client::getCurrent()->makeOperationContext(); auto swCollAndChunks = [&]() -> StatusWith<CollectionAndChangedChunks> { @@ -191,7 +189,7 @@ std::shared_ptr<Notification<void>> ConfigServerCatalogCacheLoader::getChunksSin callbackFn(opCtx.get(), std::move(swCollAndChunks)); notify->set(); - }); + })); return notify; } @@ -199,9 +197,7 @@ std::shared_ptr<Notification<void>> ConfigServerCatalogCacheLoader::getChunksSin void ConfigServerCatalogCacheLoader::getDatabase( StringData dbName, stdx::function<void(OperationContext*, StatusWith<DatabaseType>)> callbackFn) { - _threadPool.schedule([ name = dbName.toString(), callbackFn ](auto status) noexcept { - invariant(status); - + uassertStatusOK(_threadPool.schedule([ name = dbName.toString(), callbackFn ]() noexcept { auto opCtx = Client::getCurrent()->makeOperationContext(); auto swDbt = [&]() -> StatusWith<DatabaseType> { @@ -218,7 +214,7 @@ void ConfigServerCatalogCacheLoader::getDatabase( }(); callbackFn(opCtx.get(), std::move(swDbt)); - }); + })); } } // namespace mongo |