Today all WiredTigerRecordStore instances contain the following fields just in case they are the oplog:
- A shared_ptr for the truncate markers
- A boolean flag for knowing whether or not we're the oplog record store.
- Metadata regarding oplog max size and the first timestamp present
- Metrics for the oplog cap maintainer thread recording time spent truncating and the number of documents truncated
This leads to unnecessarily keeping unrelated stuff in the class instances of ALL collections present on the server.
The oplog itself is somewhat of a universal RecordStore so there's only one of them on the server at all times. This means these members could very well be marked as decorations keeping only the boolean flag to decide whether to access them or not.
- related to
-
SERVER-90220 move WiredTigerRecordStore::OplogTruncateMarkers into its own implementation file
- Closed