summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_recovery_test.cpp
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2018-09-25 13:38:03 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2018-09-25 17:56:42 -0400
commit7ea530946fa7880364d88c8d8b6026bbc9ffa48c (patch)
tree788e6b2149cda1e18aa166b6368d8d70c621213d /src/mongo/db/repl/replication_recovery_test.cpp
parentbf2cfbd09d6695e2c84b295c3aa539adaf6496a8 (diff)
downloadmongo-r4.0.3-rc0.tar.gz
SERVER-36982 Fix Jepsen mmap and Linux (no journal) failuresr4.0.3-rc0r4.0.3
Diffstat (limited to 'src/mongo/db/repl/replication_recovery_test.cpp')
-rw-r--r--src/mongo/db/repl/replication_recovery_test.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mongo/db/repl/replication_recovery_test.cpp b/src/mongo/db/repl/replication_recovery_test.cpp
index 1a7cc5f8be8..cd5e072a513 100644
--- a/src/mongo/db/repl/replication_recovery_test.cpp
+++ b/src/mongo/db/repl/replication_recovery_test.cpp
@@ -78,11 +78,22 @@ public:
_supportsRecoverToStableTimestamp = supports;
}
+ bool supportsRecoveryTimestamp(ServiceContext* serviceCtx) const override {
+ stdx::lock_guard<stdx::mutex> lock(_mutex);
+ return _supportsRecoveryTimestamp;
+ }
+
+ void setSupportsRecoveryTimestamp(bool supports) {
+ stdx::lock_guard<stdx::mutex> lock(_mutex);
+ _supportsRecoveryTimestamp = supports;
+ }
+
private:
mutable stdx::mutex _mutex;
Timestamp _initialDataTimestamp = Timestamp::min();
boost::optional<Timestamp> _recoveryTimestamp = boost::none;
bool _supportsRecoverToStableTimestamp = true;
+ bool _supportsRecoveryTimestamp = true;
};
class ReplicationRecoveryTest : public ServiceContextMongoDTest {
@@ -357,9 +368,9 @@ DEATH_TEST_F(ReplicationRecoveryTest,
}
DEATH_TEST_F(ReplicationRecoveryTest,
- RecoveryInvariantsIfStableTimestampAndDoesNotSupportRTT,
+ RecoveryInvariantsIfStableTimestampAndDoesNotSupportRecoveryTimestamp,
"Invariant failure") {
- getStorageInterfaceRecovery()->setSupportsRecoverToStableTimestamp(false);
+ getStorageInterfaceRecovery()->setSupportsRecoveryTimestamp(false);
ReplicationRecoveryImpl recovery(getStorageInterface(), getConsistencyMarkers());
auto opCtx = getOperationContext();