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

Split horizon mappings in ReplSetConfig/MemberConfig should be serialized deterministically

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.10, 5.0.4, 5.1.0-rc0
    • Affects Version/s: 4.4.8, 5.0.2
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v5.0, v4.4
    • Repl 2021-10-04

      The toBSON() for SplitHorizon serializes the strings in a StringMap in iterator order, which is by design nondeterministic. The resulting configs are equivalent, but since we use ordered comparisons to test if they are equivalent when seeing if contents have changed, we can erroneously detect changes in the set when there haven't been any. This can lead to extra network traffic (isSelf) and unnecessary read-concern-majority delay (because we will unnecessarily clear the committed snapshot)

      ReplSetConfigWriteConcernModes has the same issue.

            Assignee:
            matthew.russotto@mongodb.com Matthew Russotto
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            1 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved: