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/periodic_runner_job_decrease_snapshot_cache_pressure.h | |
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/periodic_runner_job_decrease_snapshot_cache_pressure.h')
-rw-r--r-- | src/mongo/db/periodic_runner_job_decrease_snapshot_cache_pressure.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/periodic_runner_job_decrease_snapshot_cache_pressure.h b/src/mongo/db/periodic_runner_job_decrease_snapshot_cache_pressure.h index fca8b832fbf..1b6c2e65b18 100644 --- a/src/mongo/db/periodic_runner_job_decrease_snapshot_cache_pressure.h +++ b/src/mongo/db/periodic_runner_job_decrease_snapshot_cache_pressure.h @@ -34,13 +34,15 @@ namespace mongo { class ServiceContext; /** - * Periodically checks for storage engine cache pressure to determine whether the maintained - * snapshot history window target setting should be decreased. Maintaining too much snapshot and - * write history can slow down the system. Runs once every checkCachePressurePeriodSeconds. + * Periodically checks whether there has been any storage engine cache pressure and SnapshotTooOld + * errors to determine whether the maintained snapshot history window target setting should be + * decreased. If there has been cache pressure and no new SnapshotTooOld errors in the last period, + * then the target window size will be decrease. Maintaining too much snapshot and write history can + * slow down the system. Runs once every decreaseHistoryIfNotNeededPeriodSeconds. * * This function should only ever be called once, during mongod server startup (db.cpp). * The PeriodicRunner will handle shutting down the job on shutdown, no extra handling necessary. */ -void startPeriodicThreadToDecreaseSnapshotHistoryCachePressure(ServiceContext* serviceContext); +void startPeriodicThreadToDecreaseSnapshotHistoryIfNotNeeded(ServiceContext* serviceContext); } // namespace mongo |