[SERVER-59867] Split horizon mappings in ReplSetConfig/MemberConfig should be serialized deterministically Created: 09/Sep/21  Updated: 29/Oct/23  Resolved: 27/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.4.8, 5.0.2
Fix Version/s: 4.4.10, 5.0.4, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Matthew Russotto
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-59866 Stop FCV from waiting for majority wh... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4
Sprint: Repl 2021-10-04
Participants:
Case:

 Description   

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.



 Comments   
Comment by Githook User [ 27/Sep/21 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-59867 Split horizon mappings in ReplSetConfig/MemberConfig should be serialized deterministically.

(cherry picked from commit 8675c70fd480557fd1c5c9b3ce9e731b1101f93f)
Branch: v4.4
https://github.com/mongodb/mongo/commit/d049950543b522291f71145acb601e7d5401b28c

Comment by Githook User [ 27/Sep/21 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-59867 Split horizon mappings in ReplSetConfig/MemberConfig should be serialized deterministically.

(cherry picked from commit 8675c70fd480557fd1c5c9b3ce9e731b1101f93f)
Branch: v5.0
https://github.com/mongodb/mongo/commit/2b64b4a8f7149bac05648eff15e95a4a8330d220

Comment by Githook User [ 24/Sep/21 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-59867 Split horizon mappings in ReplSetConfig/MemberConfig sho…
Branch: master
https://github.com/mongodb/mongo/commit/8675c70fd480557fd1c5c9b3ce9e731b1101f93f

Comment by Judah Schvimer [ 22/Sep/21 ]

Is there ever a circumstance where we'd expect to detect config changes on step up? If not, we should ensure step up never has this negative performance impact.

Generated at Thu Feb 08 05:48:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.