diff options
author | Tyler Seip <Tyler.Seip@mongodb.com> | 2021-05-27 03:10:42 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-27 17:54:41 +0000 |
commit | d7c69eb4c0453f77047fcc95ed4ab76a6580718c (patch) | |
tree | 137d6ea0abc2b30daf557991e70083178ce9754f /src | |
parent | ccae51b66b6c1fb5ae852b4faca5396d18833a2a (diff) | |
download | mongo-d7c69eb4c0453f77047fcc95ed4ab76a6580718c.tar.gz |
SERVER-57235: Don't tassert on ShutdownInProgress in MirrorMaestro
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/mirror_maestro.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/mirror_maestro.cpp b/src/mongo/db/mirror_maestro.cpp index 14eb37427a5..c5f6d54e553 100644 --- a/src/mongo/db/mirror_maestro.cpp +++ b/src/mongo/db/mirror_maestro.cpp @@ -425,8 +425,13 @@ void MirrorMaestroImpl::_mirror(const std::vector<HostAndPort>& hosts, auto status = _executor->scheduleRemoteCommand(newRequest, std::move(mirrorResponseCallback)) .getStatus(); - tassert(status); + if (ErrorCodes::isShutdownError(status.code())) { + LOGV2_DEBUG(5723501, 1, "Aborted mirroring due to shutdown", "reason"_attr = status); + return; + } + + tassert(status); gMirroredReadsSection.sent.fetchAndAdd(1); } } catch (const DBException& e) { |