diff options
author | Dianna <dianna.hohensee@10gen.com> | 2019-05-15 08:41:20 -0400 |
---|---|---|
committer | Dianna <dianna.hohensee@10gen.com> | 2019-05-17 17:31:45 -0400 |
commit | 8899b34e1044b08aec7ad9f8546652456472702c (patch) | |
tree | d7aecc9bc566326ed9ecc9b6b093bbe5797a1d36 /src/mongo/db/storage/devnull | |
parent | 278e1936f837c260e037ce7e56ac93586247fa61 (diff) | |
download | mongo-8899b34e1044b08aec7ad9f8546652456472702c.tar.gz |
SERVER-36956 SnapshotTooOld errors will always increase the snapshot history window size
Diffstat (limited to 'src/mongo/db/storage/devnull')
-rw-r--r-- | src/mongo/db/storage/devnull/devnull_kv_engine.cpp | 10 | ||||
-rw-r--r-- | src/mongo/db/storage/devnull/devnull_kv_engine.h | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/storage/devnull/devnull_kv_engine.cpp b/src/mongo/db/storage/devnull/devnull_kv_engine.cpp index 6ae745c5587..e9437a18908 100644 --- a/src/mongo/db/storage/devnull/devnull_kv_engine.cpp +++ b/src/mongo/db/storage/devnull/devnull_kv_engine.cpp @@ -261,13 +261,13 @@ SortedDataInterface* DevNullKVEngine::getSortedDataInterface(OperationContext* o return new DevNullSortedDataInterface(); } -bool DevNullKVEngine::isCacheUnderPressure(OperationContext* opCtx) const { - return (_cachePressureForTest >= snapshotWindowParams.cachePressureThreshold.load()); +int64_t DevNullKVEngine::getCacheOverflowTableInsertCount(OperationContext* opCtx) const { + return _overflowTableInsertCountForTest; } -void DevNullKVEngine::setCachePressureForTest(int pressure) { - invariant(pressure >= 0 && pressure <= 100); - _cachePressureForTest = pressure; +void DevNullKVEngine::setCacheOverflowTableInsertCountForTest(int insertsCount) { + invariant(insertsCount >= 0); + _overflowTableInsertCountForTest = insertsCount; } StatusWith<std::vector<std::string>> DevNullKVEngine::beginNonBlockingBackup( diff --git a/src/mongo/db/storage/devnull/devnull_kv_engine.h b/src/mongo/db/storage/devnull/devnull_kv_engine.h index e753e8805c0..04900f06fae 100644 --- a/src/mongo/db/storage/devnull/devnull_kv_engine.h +++ b/src/mongo/db/storage/devnull/devnull_kv_engine.h @@ -97,9 +97,9 @@ public: return true; } - virtual bool isCacheUnderPressure(OperationContext* opCtx) const override; + virtual int64_t getCacheOverflowTableInsertCount(OperationContext* opCtx) const override; - virtual void setCachePressureForTest(int pressure) override; + virtual void setCacheOverflowTableInsertCountForTest(int insertCount) override; virtual int64_t getIdentSize(OperationContext* opCtx, StringData ident) { return 1; @@ -150,6 +150,6 @@ public: private: std::shared_ptr<void> _catalogInfo; - int _cachePressureForTest; + int _overflowTableInsertCountForTest; }; } |