AutoGetOplog does not behave as expected due to the collection pointer not being cached in standalone mode, even if the collection exists because previously the node was started as part of a replica set.
Example:
When validate cmd detects and inconsistency it attempts to fetch the associated oplog entry. To do so, it uses AutoGetOplog, which relies on LocalOplogInfo.
The Collection ptr in LocalOplogInfo is not populated in standalone mode (acquireOplogCollectionForLogging) unless recoverFromOplogAsStandalone, resulting in a segmentation fault due to dereferencing a nullptr.
- is caused by
-
SERVER-74642 Log additional information about the oplog entry that generated a document or index key when printing metadata
- Closed
- is related to
-
SERVER-80809 Make _logOplogEntriesForInvalidResults resilient to non-existing oplog
- Closed
- related to
-
SERVER-80863 Centralise cached oplog pointer initialization to collection registering in catalog
- Backlog