diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-05-14 13:17:13 -0400 |
---|---|---|
committer | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-05-14 23:35:24 -0400 |
commit | f3eb44233050eee4da6aeaf4b4f93e9fb326a4d3 (patch) | |
tree | b7ef95599454b376651f6f54fffd20b4be5c2b67 /src | |
parent | d6879b6d895a231be17b3adf4bcffa556d05ae17 (diff) | |
download | mongo-f3eb44233050eee4da6aeaf4b4f93e9fb326a4d3.tar.gz |
SERVER-16176 Log slow checkpoints in WiredTiger
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp index 275687829b3..20c52321578 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp @@ -299,6 +299,8 @@ public: break; } + const Date_t startTime = Date_t::now(); + const Timestamp stableTimestamp = _wiredTigerKVEngine->getStableTimestamp(); const Timestamp initialDataTimestamp = _wiredTigerKVEngine->getInitialDataTimestamp(); @@ -361,6 +363,11 @@ public: oplogNeededForRollback.getValue().asULL()); } } + + const auto secondsElapsed = durationCount<Seconds>(Date_t::now() - startTime); + if (secondsElapsed >= 30) { + LOG(1) << "Checkpoint took " << secondsElapsed << " seconds to complete."; + } } catch (const WriteConflictException&) { // Temporary: remove this after WT-3483 warning() << "Checkpoint encountered a write conflict exception."; |