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

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.0.6, 4.1.6
    • Storage
    • None
    • Fully Compatible
    • v4.0
    • 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

              daniel.gottlieb@mongodb.com Daniel Gottlieb
              daniel.gottlieb@mongodb.com Daniel Gottlieb
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: