From a854e4a768da44f820f13742caba92486dc5e58d Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Wed, 24 Jan 2018 10:50:00 -0500 Subject: SERVER-32783 remove unnecessary scheduleWork call from CollectionCloner::_verifyCollectionDropped() (cherry picked from commit 785f56934fcb09f121980ccf6c51d97c3af80fa2) --- src/mongo/db/repl/collection_cloner.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/mongo/db/repl/collection_cloner.cpp b/src/mongo/db/repl/collection_cloner.cpp index a6d9342c464..ffcbf7fafb0 100644 --- a/src/mongo/db/repl/collection_cloner.cpp +++ b/src/mongo/db/repl/collection_cloner.cpp @@ -866,14 +866,7 @@ void CollectionCloner::_verifyCollectionWasDropped( << "' uuid: UUID(\"" << *_options.uuid << "\"), status " << args.response.status; } - // Because setResultAndCancelRemainingWork destroys the RemoteCommandRetryScheduler, it - // must be done outside this callback. - auto result = _executor->scheduleWork([this, finalStatus, onCompletionGuard]( - const executor::TaskExecutor::CallbackArgs& args) { - UniqueLock lk(_mutex); - onCompletionGuard->setResultAndCancelRemainingWork_inlock(lk, finalStatus); - }); - invariant(result.isOK() || result.getStatus().code() == ErrorCodes::ShutdownInProgress); + onCompletionGuard->setResultAndCancelRemainingWork_inlock(lk, finalStatus); }, RemoteCommandRetryScheduler::makeNoRetryPolicy()); -- cgit v1.2.1