diff options
author | Jamie Heppenstall <jamie.heppenstall@mongodb.com> | 2020-04-13 19:16:31 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-17 05:28:39 +0000 |
commit | c5523e7d237b66f35c1ad4cd8a7d28e8dea9feb7 (patch) | |
tree | d94ff315a41dabce5336acc7ae7830cd79f8aa26 | |
parent | 3715b6221884b30b15f183f813675e27f30123eb (diff) | |
download | mongo-c5523e7d237b66f35c1ad4cd8a7d28e8dea9feb7.tar.gz |
SERVER-46699 Report the oplog visibility timestamp in FTDC
(cherry picked from commit 454e1823bbbe7cc25d6f34856913d8161d729e4b)
-rw-r--r-- | src/mongo/bson/timestamp.h | 2 | ||||
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h | 2 | ||||
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/bson/timestamp.h b/src/mongo/bson/timestamp.h index 231f42e422d..b876001e7c2 100644 --- a/src/mongo/bson/timestamp.h +++ b/src/mongo/bson/timestamp.h @@ -64,7 +64,7 @@ public: explicit Timestamp(Date_t date) : Timestamp(date.toULL()) {} /** - * DEPRECATED Constructor that builds a Timestamp from a 64-bit unsigned integer by using + * Constructor that builds a Timestamp from a 64-bit unsigned integer by using * the high-order 4 bytes of "v" for the "secs" field and the low-order 4 bytes for the "i" * field. */ diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h index 2e35cce5353..5c6bb356b17 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h @@ -111,6 +111,6 @@ private: // journal flushing should not be delayed. std::int64_t _opsWaitingForVisibility = 0; // Guarded by oplogVisibilityStateMutex. - AtomicUInt64 _oplogReadTimestamp; + AtomicUInt64 _oplogReadTimestamp{0}; }; } // namespace mongo diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp index 6e17530982e..34e4f314c9b 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp @@ -83,6 +83,12 @@ BSONObj WiredTigerServerStatusSection::generateSection(OperationContext* opCtx, WiredTigerKVEngine::appendGlobalStats(bob); + { + BSONObjBuilder subsection(bob.subobjStart("oplog")); + subsection.append("visibility timestamp", + Timestamp(_engine->getOplogManager()->getOplogReadTimestamp())); + } + return bob.obj(); } |