Split horizon mappings in ReplSetConfig/MemberConfig should be serialized deterministically

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Matthew Russotto
            Votes:
            1 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated:
              Resolved: