0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-32783 remove unnecessary scheduleWork call from CollectionCloner::_verifyCollectionDropped()

This commit is contained in:
Benety Goh 2018-01-24 10:50:00 -05:00
parent 73f0e0047a
commit 785f56934f

View File

@ -832,14 +832,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());