summaryrefslogtreecommitdiff
path: root/src/mongo/db/snapshot_window_options.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/snapshot_window_options.h')
-rw-r--r--src/mongo/db/snapshot_window_options.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/snapshot_window_options.h b/src/mongo/db/snapshot_window_options.h
index 6944e78e18f..5ede44532ee 100644
--- a/src/mongo/db/snapshot_window_options.h
+++ b/src/mongo/db/snapshot_window_options.h
@@ -49,7 +49,7 @@ struct SnapshotWindowParams {
//
// Note that the window size can become greater than this if an ongoing operation is holding an
// older snapshot open.
- AtomicInt32 maxTargetSnapshotHistoryWindowInSeconds{5};
+ AtomicWord<int> maxTargetSnapshotHistoryWindowInSeconds{5};
// targetSnapshotHistoryWindowInSeconds (not a server parameter, range 0+).
//
@@ -60,7 +60,7 @@ struct SnapshotWindowParams {
// not always reflect it: the window can only change as more writes come in, so it can take time
// for the actual window size to catch up with a change. This value guides actions whenever the
// system goes to update the oldest_timestamp value.
- AtomicInt32 targetSnapshotHistoryWindowInSeconds{
+ AtomicWord<int> targetSnapshotHistoryWindowInSeconds{
maxTargetSnapshotHistoryWindowInSeconds.load()};
// cachePressureThreshold (startup & runtime server paramter, range [0, 100]).
@@ -70,7 +70,7 @@ struct SnapshotWindowParams {
// targetSnapshotHistoryWindowInSeconds will be ignored when the cache pressure reaches this
// threshold. Additionally, a periodic task will decrease targetSnapshotHistoryWindowInSeconds
// when cache pressure exceeds the threshold.
- AtomicInt32 cachePressureThreshold{50};
+ AtomicWord<int> cachePressureThreshold{50};
// snapshotWindowMultiplicativeDecrease (startup & runtime server paramter, range (0,1)).
//
@@ -83,7 +83,7 @@ struct SnapshotWindowParams {
// Controls by how much the target snapshot history window setting is increased when cache
// pressure is OK, per cachePressureThreshold, and we need to service older snapshots for global
// point-in-time reads.
- AtomicInt32 snapshotWindowAdditiveIncreaseSeconds{2};
+ AtomicWord<int> snapshotWindowAdditiveIncreaseSeconds{2};
// minMillisBetweenSnapshotWindowInc (startup & runtime server paramter, range 0+).
// minMillisBetweenSnapshotWindowDec (startup & runtime server paramter, range 0+).
@@ -93,8 +93,8 @@ struct SnapshotWindowParams {
// as one. This protects the system because it takes time for the target snapshot window to
// affect the actual storage engine snapshot window. The stable timestamp must move forward for
// the window between it and oldest timestamp to grow or shrink.
- AtomicInt32 minMillisBetweenSnapshotWindowInc{500};
- AtomicInt32 minMillisBetweenSnapshotWindowDec{500};
+ AtomicWord<int> minMillisBetweenSnapshotWindowInc{500};
+ AtomicWord<int> minMillisBetweenSnapshotWindowDec{500};
// checkCachePressurePeriodSeconds (startup & runtime server paramter, range 1+)
//
@@ -102,7 +102,7 @@ struct SnapshotWindowParams {
// targetSnapshotHistoryWindowInSeconds if the pressure is above cachePressureThreshold. The
// target window size setting must not be decreased too fast because time must be allowed for
// the storage engine to attempt to act on the new setting.
- AtomicInt32 checkCachePressurePeriodSeconds{5};
+ AtomicWord<int> checkCachePressurePeriodSeconds{5};
};
extern SnapshotWindowParams snapshotWindowParams;