-
Type:
Bug
-
Resolution: Won't Do
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
RSSD
-
None
-
None
-
None
-
None
-
None
-
None
-
None
replSetResizeOplog can set size and/or time retention for the oplog. Right now the size value is written to the catalog and persisted across node restarts, but the time is only updated in-memory and reverts to the existing configuration (default or --oplogMinRetentionHours parameter) after restart.
This is handled here in the code: size is passed to updateCappedSize which internally calls _writeMetadata to update the catalog, while time is only used to update the in-memory config parameter.
Unclear if this is intentional, the docs for the command seem aware that only size is persisted:
"The new oplog size persists after a server restart, unless you use:
- storage.oplogMinRetentionHours"
The doc should probably be updated if we change this behavior.