Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-37484

Only alter table logging settings on startup and not collection creation

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.6, 4.1.6
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.0
    • Sprint:
      Storage NYC 2018-11-19

      Description

      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:

      1. Startup
      2. Collection and index creation
      3. 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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: