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

Do not execute TSBucketingParametersUnchanged feature flag check on secondaries performing oplog application

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • ALL
    • v8.0

      Came out of the QI feature flag audit. From my understanding, secondaries will check the TSBucketingParametersUnchanged feature flag when applying a collmod operation.

      For context we're not supposed to perform feature flag checks on secondaries performing oplog application because the secondary could race with setFCV and make a different decision than the primary (resulting in data divergence). 

      Example sequence of events (an upgrade that races with collMod) that results in data divergence. 

      • The primary is on a version that does not have TSBucketingParametersUnchanged enabled
      • We run a collMod operation on a time-series collection on the primary that changes the time-series bucketing parameters (i.e. changes bucketRoundingSeconds or bucketMaxSpanSeconds)
      • This feature flag check would return false so the metadata will not be written to disk on the primary
      • An upgrade starts
      • The secondary starts applying the collMod operation, calling processCollModCommandForApplyOps()
      • The same feature flag check would return true
      • The metadata gets written to disk on the secondary

            Assignee:
            Unassigned Unassigned
            Reporter:
            erin.liang@mongodb.com Erin Liang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: