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

Only alter table logging settings on startup and not collection creation

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.6, 4.1.6
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Fully Compatible
    • v4.0
    • Storage NYC 2018-11-19

      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.

            Assignee:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: