diff options
author | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2019-04-18 07:37:06 -0400 |
---|---|---|
committer | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2019-04-18 17:17:43 -0400 |
commit | b0526e0641e7a08b8dd681d4adad04d86f729391 (patch) | |
tree | bbedc2f174de359040c2bcd29575249d0b505cf3 /src/mongo/db/storage/wiredtiger | |
parent | 063d5ff4589aba211f7c6eaea2b180f29a752cd2 (diff) | |
download | mongo-b0526e0641e7a08b8dd681d4adad04d86f729391.tar.gz |
SERVER-40708 More logging in TestOplogTruncation
Diffstat (limited to 'src/mongo/db/storage/wiredtiger')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp index 9229c4df0f8..ef37d8dc573 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp @@ -43,6 +43,7 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_global_options.h" #include "mongo/db/storage/wiredtiger/wiredtiger_kv_engine.h" #include "mongo/db/storage/wiredtiger/wiredtiger_record_store.h" +#include "mongo/logger/logger.h" #include "mongo/stdx/memory.h" #include "mongo/unittest/temp_dir.h" #include "mongo/unittest/unittest.h" @@ -240,6 +241,14 @@ TEST_F(WiredTigerKVEngineTest, TestOplogTruncation) { _engine->setInitialDataTimestamp(Timestamp(1, 1)); wiredTigerGlobalOptions.checkpointDelaySecs = 1; + // To diagnose any intermittent failures, maximize logging from WiredTigerKVEngine and friends. + const auto kStorage = logger::LogComponent::kStorage; + auto originalVerbosity = logger::globalLogDomain()->getMinimumLogSeverity(kStorage); + logger::globalLogDomain()->setMinimumLoggedSeverity(kStorage, logger::LogSeverity::Debug(3)); + ON_BLOCK_EXIT([&]() { + logger::globalLogDomain()->setMinimumLoggedSeverity(kStorage, originalVerbosity); + }); + // Simulate the callback that queries config.transactions for the oldest active transaction. boost::optional<Timestamp> oldestActiveTxnTimestamp; AtomicWord<bool> callbackShouldFail{false}; |