For upgrade and --enableMajorityReads toggling, startup of a 4.1 mongod must accommodate cases where table logging settings are not in the desired state for the current process lifetime.
Currently that modification is done in the WTRecordStore and WTIndex constructors.
The constructor code path is hit in 3 cases:
- Collection and index creation
- Rollback via RTT
Because the desired setting cannot change during the lifetime of a process, ideally we'd only perform the operation on startup (creating new tables selects the right one). I don't believe there's a clear way to distinguish between these cases;
I believe the real work of this ticket is to find/add one.
Going by alexander.gorrod's last comment, we can first query the metadata and do a (fragile) string search for log=(enabled=<true|false>) and only call alter if the settings need to be changed.
- depends on
SERVER-37483 Reintroduce live changes to table logging settings
- is duplicated by
SERVER-38447 create index blocked by checkpoint mutex
- is related to
WT-4354 Improve fast path WT_SESSION:alter