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

Prevent 5.0 binary from starting in FCV 4.4 with misconfigured TTL index

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.11
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Execution Team 2022-08-08, Execution Team 2022-08-22

      TTL indexes configured with a NaN for the expireAfterSeconds options are handled differently in 5.0+ binaries by the TTL Monitor for the purposes of calculating an expiration date for the indexed documents. To avoid a mix of 5.0 and 4.4 behaviors for these misconfigured TTL indexes, we should detect these indexes during the upgrade and downgrade steps and fail accordingly.

      With this fix, MongoDB 5.0.11 will:

      • Log an error and crash on start-up if it's running in FCV 4.4 and detects a bad index. In addition to clusters upgrading directly from version 4.4, this includes clusters running featureCompatibilityVersion (FCV) 4.4 in versions 5.0.0 - 5.0.10.
      • Fail to create a new misconfigured TTL index (either via user operation or initial sync) when running FCV 4.4.
      • Start properly and allow the creation of new misconfigured TTL indexes when running FCV 5.0, and treat this configuration as expireAfterSeconds: 0, preserving behavior from versions 5.0.0-5.0.10.
      • Fail to downgrade to FCV 4.4 if a misconfigured TTL index exists.

      To avoid any of these problematic behaviors, do not use expireAfterSeconds: NaN.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            dan.larkin-york@mongodb.com Dan Larkin-York
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: