diff options
author | Moustafa Maher <m.maher@10gen.com> | 2021-01-29 21:33:53 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-05 21:18:38 +0000 |
commit | 48378a8ef6f2eec3f7aff4fe7c0bdad6a44b639c (patch) | |
tree | 256d4f99f7327298f8542a648cb58fe26dd521a9 /src/mongo/db/curop.cpp | |
parent | 857ec7949839102d30b1bf3c82b1437a70970084 (diff) | |
download | mongo-48378a8ef6f2eec3f7aff4fe7c0bdad6a44b639c.tar.gz |
SERVER-54120 Move away from getLog to check if a command is done in our tests
Diffstat (limited to 'src/mongo/db/curop.cpp')
-rw-r--r-- | src/mongo/db/curop.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index a0e60fa3d1a..3898a2f98ab 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -599,6 +599,10 @@ bool CurOp::completeAndLogOperation(OperationContext* opCtx, // Failpoints after commands are logged. constexpr auto kPrepareTransactionCmdName = "prepareTransaction"_sd; MONGO_FAIL_POINT_DEFINE(waitForPrepareTransactionCommandLogged); +constexpr auto kHelloCmdName = "hello"_sd; +MONGO_FAIL_POINT_DEFINE(waitForHelloCommandLogged); +constexpr auto kIsMasterCmdName = "isMaster"_sd; +MONGO_FAIL_POINT_DEFINE(waitForIsMasterCommandLogged); void CurOp::_checkForFailpointsAfterCommandLogged() { if (!isCommand() || !getCommand()) { @@ -610,6 +614,14 @@ void CurOp::_checkForFailpointsAfterCommandLogged() { if (MONGO_unlikely(waitForPrepareTransactionCommandLogged.shouldFail())) { LOGV2(31481, "waitForPrepareTransactionCommandLogged failpoint enabled"); } + } else if (cmdName == kHelloCmdName) { + if (MONGO_unlikely(waitForHelloCommandLogged.shouldFail())) { + LOGV2(31482, "waitForHelloCommandLogged failpoint enabled"); + } + } else if (cmdName == kIsMasterCmdName) { + if (MONGO_unlikely(waitForIsMasterCommandLogged.shouldFail())) { + LOGV2(31483, "waitForIsMasterCommandLogged failpoint enabled"); + } } } |