summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@10gen.com>2019-07-02 09:48:38 -0400
committerDianna Hohensee <dianna.hohensee@10gen.com>2019-07-02 17:21:46 -0400
commit823c44416e3aef98796ae0aecb6f574ad71f7c94 (patch)
treece5baea6082b6a4aba7ea98e7d0a43d9e7e84e64 /src/mongo/db/storage
parentc41f406d66fbc18ee29eb6524483515f6f7c2b83 (diff)
downloadmongo-823c44416e3aef98796ae0aecb6f574ad71f7c94.tar.gz
SERVER-41561 add SnapshotTooOld error counting metric to serverStatus
Diffstat (limited to 'src/mongo/db/storage')
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp3
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_util.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
index bfeaa5bca8c..e12f55e639d 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
@@ -691,10 +691,13 @@ void WiredTigerUtil::appendSnapshotWindowSettings(WiredTigerKVEngine* engine,
int64_t score = uassertStatusOK(WiredTigerUtil::getStatisticsValue(
session->getSession(), "statistics:", "", WT_STAT_CONN_CACHE_LOOKASIDE_SCORE));
+ auto totalNumberOfSnapshotTooOldErrors = snapshotWindowParams.snapshotTooOldErrorCount.load();
+
BSONObjBuilder settings(bob->subobjStart("snapshot-window-settings"));
settings.append("cache pressure percentage threshold",
snapshotWindowParams.cachePressureThreshold.load());
settings.append("current cache pressure percentage", score);
+ settings.append("total number of SnapshotTooOld errors", totalNumberOfSnapshotTooOldErrors);
settings.append("max target available snapshots window size in seconds",
snapshotWindowParams.maxTargetSnapshotHistoryWindowInSeconds.load());
settings.append("target available snapshots window size in seconds",
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.h b/src/mongo/db/storage/wiredtiger/wiredtiger_util.h
index 4a36284c558..5e6fb9b686a 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.h
@@ -160,6 +160,7 @@ public:
* "snapshot-window-settings" : {
* "cache pressure percentage threshold" : <num>,
* "current cache pressure percentage" : <num>,
+ * "total number of SnapshotTooOld errors" : <num>,
* "max target available snapshots window size in seconds" : <num>,
* "target available snapshots window size in seconds" : <num>,
* "current available snapshots window size in seconds" : <num>,