diff options
author | Andrew Shuvalov <andrew.shuvalov@mongodb.com> | 2021-12-06 15:25:08 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-12-28 21:25:36 +0000 |
commit | 894fcdfe10daef80df99ee9155328d2380dba7a8 (patch) | |
tree | 1486b55a82982f5ba52b09bf773bce5e8ab8822b | |
parent | 705a4efe2983450591509e254308859edb67ccb4 (diff) | |
download | mongo-894fcdfe10daef80df99ee9155328d2380dba7a8.tar.gz |
SERVER-61921 fix link error in noSSL mode
-rw-r--r-- | src/mongo/db/process_health/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/db/process_health/state_machine.h | 9 | ||||
-rw-r--r-- | src/mongo/db/process_health/state_machine_test.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/process_health/SConscript b/src/mongo/db/process_health/SConscript index 1d72eaee411..82bdded2855 100644 --- a/src/mongo/db/process_health/SConscript +++ b/src/mongo/db/process_health/SConscript @@ -27,6 +27,7 @@ env.Library( '$BUILD_DIR/mongo/executor/thread_pool_task_executor', ], LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/util/concurrency/thread_pool', 'process_health_feature_flag', ], ) diff --git a/src/mongo/db/process_health/state_machine.h b/src/mongo/db/process_health/state_machine.h index 7a658a434a8..a3972827b47 100644 --- a/src/mongo/db/process_health/state_machine.h +++ b/src/mongo/db/process_health/state_machine.h @@ -33,6 +33,7 @@ #include "mongo/stdx/unordered_map.h" #include "mongo/stdx/unordered_set.h" #include "mongo/util/functional.h" +#include "mongo/util/stacktrace.h" #include "mongo/util/str.h" namespace mongo { @@ -83,13 +84,11 @@ public: } void tassertNotStarted() const { - tassert( - 5936505, "operation cannot be performed after the state machine is started", !_started); + invariant(!_started, "operation cannot be performed after the state machine is started"); } void tassertStarted() const { - tassert( - 5936508, "operation cannot be performed before the state machine is started", _started); + invariant(_started, "operation cannot be performed before the state machine is started"); } // Transitions the state machine into the initial state. @@ -245,7 +244,7 @@ protected: auto& transitions = previousContext.validTransitions; auto it = transitions.find(s); - tassert(5936506, "invalid state transition", it != transitions.end()); + invariant(it != transitions.end(), "invalid state transition"); // in production, an illegal transition is a noop if (it == transitions.end()) diff --git a/src/mongo/db/process_health/state_machine_test.cpp b/src/mongo/db/process_health/state_machine_test.cpp index c7c3e48115f..1ddde55578e 100644 --- a/src/mongo/db/process_health/state_machine_test.cpp +++ b/src/mongo/db/process_health/state_machine_test.cpp @@ -226,7 +226,7 @@ TEST_F(StateMachineTestFixture, MoveWorks) { ASSERT_TRUE(MachineState::B == stateMachine2.state()); } -DEATH_TEST_F(StateMachineTestFixture, CrashIfHooksAreRegisteredAfterStart, "5936505") { +DEATH_TEST_F(StateMachineTestFixture, CrashIfHooksAreRegisteredAfterStart, "invariant") { auto hook = []() { return [](MachineState oldState, MachineState newState, const SM::OptionalMessageType& m) {}; @@ -235,7 +235,7 @@ DEATH_TEST_F(StateMachineTestFixture, CrashIfHooksAreRegisteredAfterStart, "5936 subject()->on(MachineState::B)->enter(hook())->exit(hook()); } -DEATH_TEST_F(StateMachineTestFixture, CrashOnInvalidTransition, "5936506") { +DEATH_TEST_F(StateMachineTestFixture, CrashOnInvalidTransition, "invariant") { subject()->start(); subject()->accept(Message{MachineState::C}); } |