Atlas Minimum Oplog Window (oplogMinRetentionHours)
Parent: Oplog sizing under storage auto-scaling · Published reference · snapshot 2026-10-30
↓ Facts as markdownall context files
Source-anchored research for Atlas Minimum Oplog Window (oplogMinRetentionHours). Run status: COMPLETED.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Definitions
- The observed oplog window is the time between the oldest and newest retained oplog timestamps. db.getReplicationInfo() or rs.printReplicationInfo() helps inspect the available history; that measured span is distinct from the configured minimum. (high confidence) [source]
How it works
- The underlying MongoDB minimum-retention policy removes old oplog entries only when both the configured oplog size has been reached and the entries are older than the configured retention period, measured using the host system clock. Entries can therefore remain longer than the minimum. (high confidence) [source]
- Atlas Core exposes the minimum-window setting when storage auto-scaling is enabled. To use a fixed oplog size, Atlas instructs operators to opt out of storage auto-scaling and set Minimum Oplog Window to 0. Atlas does not support replSetResizeOplog for resizing its oplog. (low confidence) (verified as of 2026-10-30) [source]
- The WiredTiger storage design README says OplogTruncateMarkers respects oplogMinRetentionHours by truncating a sequential range only when it is outside the required minimum retention interval. (low confidence) [source]
- A secondary performing logical initial sync needs retained oplog history while it copies data and catches up. The minimum duration should accommodate that process, whose requirements depend on data volume and instance capacity. (medium confidence) [source]
Problems, failure modes and limitations
- Atlas documentation warns that some high-volume bulk writes, including migrations, can fail to maintain the configured minimum retention window. Treat the setting as insufficient evidence of the history actually available during a burst. (low confidence) (verified as of 2026-10-14) [source]
Comparisons and alternatives
- Atlas Minimum Oplog Window configures storage.oplogMinRetentionHours on each mongod. For Atlas Core with storage auto-scaling enabled, the documented default minimum retention is 24 hours; the control expresses hours rather than a fixed oplog byte size. (medium confidence) (verified as of 2026-10-30) [source]
- A September 2023 Terraform provider v1.11.0 issue reported that changing oplog_min_retention_hours to null did not clear an existing setting when moving to NVMe and disabling disk autoscaling. The API returned OPLOG_MIN_RETENTION_HOURS_NO_DISK_AUTO_SCALING; the reporter also said setting 0 failed. A maintainer expected a fix in a later release, so this is historical evidence rather than proof of a current defect. (low confidence) [source]
- MongoDB 8.0 documentation warns that reducing retention or shrinking the oplog after it has grown may leave its disk space allocated. Atlas likewise warns that space reclaimed by reducing local.oplog.rs is available to the oplog collection rather than other collections. (medium confidence) [source]
- Atlas does not support replSetResizeOplog. Configure its Minimum Oplog Window through Atlas settings instead of applying the self-managed administrative command. (medium confidence) (verified as of 2026-10-30) [source]
- The MongoDB server default has no minimum retention period, unlike Atlas's documented default. Do not substitute the self-managed server default for the Atlas setting. (medium confidence) (verified as of 2026-10-30) [source]
Facts and statements
- Minimum retention can make the oplog grow beyond its configured maximum size. High write volume combined with a long retention period can exhaust disk space, so a time setting must be backed by disk capacity and monitoring. (medium confidence) [source]
- A value of 0 disables the underlying mongod minimum-age retention constraint; it does not mean 24 hours. MongoDB 8.0 configuration documentation and Alibaba Cloud parameter documentation distinguish this from a managed service choosing a default retention setting. (medium confidence) [source]
- Crossplane provider-mongodbatlas exposes OplogMinRetentionHours as an optional float64 field with JSON name oplogMinRetentionHours and Terraform name oplog_min_retention_hours. Its field documentation describes null as using the minimum window calculated by MongoDB Cloud. (low confidence) (verified as of 2026-10-22) [source]
- Atlas Minimum Oplog Window configures storage.oplogMinRetentionHours for each mongod, expressing the minimum duration for retaining oplog entries in hours. (medium confidence) [source]
- Atlas documents a 24-hour default minimum oplog window and requires storage auto-scaling to be enabled to configure this setting. (medium confidence) (verified as of 2026-10-30) [source]
- Reducing minimum retention can truncate older entries once the oplog exceeds its configured maximum size. Consumers still needing those entries can lose required history; documented consequences include affected change streams and secondaries needing resynchronization. (low confidence) [source]
- Truncating retained oplog entries does not immediately return their allocated disk space to other collections or the operating system; lowering retention is not an immediate disk-recovery procedure. (medium confidence) [source]
Children
- Configured retention versus observed oplog window (frontier)
- Retention-driven oplog growth (frontier)
- Oplog history requirements during logical initial sync (frontier)
Frontier under this node: Configured retention versus observed oplog window, Oplog history requirements during logical initial sync, Retention-driven oplog growth