[SERVER-45975] Add --oplogMinRetentionHours argument and use it to limit oplog truncation Created: 04/Feb/20 Updated: 29/Oct/23 Resolved: 19/Feb/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication, Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Geert Bosch | Assignee: | Andrew Chen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Execution Team 2020-02-10, Execution Team 2020-02-24 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
Allow specifying a minimum retention time for the oplog in addition to a maximum size. Oplog entries are only deleted if they both exceed the size cap and the minimum retention time. The retention time is specified in hours, allowing fractions. The default is 0 hours (feature is off). Use the ReplicationCoordinator::getLastAppliedOpTime() as proxy for "now" and the timestamp derived from Stone::lastRecord as the most recent timestamp in the next oplog range to truncate. |
| Comments |
| Comment by Githook User [ 18/Feb/20 ] |
|
Author: {'name': 'Andrew Chen', 'email': 'andrew.chen@10gen.com'}Message: create mode 100644 jstests/noPassthrough/oplog_retention_hours.js |
| Comment by Githook User [ 15/Feb/20 ] |
|
Author: {'username': 'benety', 'name': 'Benety Goh', 'email': 'benety@mongodb.com'}Message: Revert " This reverts commit 0f54376c08d368ffcc80f65a0a4271cc0e6e865a. delete mode 100644 jstests/noPassthrough/oplog_retention_hours.js |
| Comment by Githook User [ 14/Feb/20 ] |
|
Author: {'name': 'Andrew Chen', 'email': 'andrew.chen@10gen.com'}Message: create mode 100644 jstests/noPassthrough/oplog_retention_hours.js |
| Comment by Andrew Chen [ 11/Feb/20 ] |
|
It seems like it is, but for now, it's simpler to use regular time stamps. There was a discussion over the scope doc. |
| Comment by Judah Schvimer [ 05/Feb/20 ] |
|
Is it possible to use the wall clock time on the oplog entries, or is that not available with the oplog stones? |