summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/wiredtiger
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@mongodb.com>2019-04-18 07:37:06 -0400
committerA. Jesse Jiryu Davis <jesse@mongodb.com>2019-04-18 17:17:43 -0400
commitb0526e0641e7a08b8dd681d4adad04d86f729391 (patch)
treebbedc2f174de359040c2bcd29575249d0b505cf3 /src/mongo/db/storage/wiredtiger
parent063d5ff4589aba211f7c6eaea2b180f29a752cd2 (diff)
downloadmongo-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.cpp9
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};