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 04:07:34 +0000 |
commit | c473a793dedff234bf2fb1124934f1af41cb8f59 (patch) | |
tree | 31b89107234b12c5c6a57354e4bb3ad1b820c771 | |
parent | 59ae5b3bcb60d20116cd7d2f8051378b53c90644 (diff) | |
download | mongo-c473a793dedff234bf2fb1124934f1af41cb8f59.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 a8e93b52349..a7849dc5410 100644 --- a/src/mongo/bson/timestamp.h +++ b/src/mongo/bson/timestamp.h @@ -63,7 +63,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 d4ee1cbf83b..3ba93550a52 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h @@ -104,6 +104,6 @@ private: // journal flushing should not be delayed. std::int64_t _opsWaitingForVisibility = 0; // Guarded by oplogVisibilityStateMutex. - AtomicWord<unsigned long long> _oplogReadTimestamp; + AtomicWord<unsigned long long> _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 100924d9e98..264ee19bb7d 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp @@ -85,6 +85,12 @@ BSONObj WiredTigerServerStatusSection::generateSection(OperationContext* opCtx, WiredTigerUtil::appendSnapshotWindowSettings(_engine, session, &bob); + { + BSONObjBuilder subsection(bob.subobjStart("oplog")); + subsection.append("visibility timestamp", + Timestamp(_engine->getOplogManager()->getOplogReadTimestamp())); + } + return bob.obj(); } |