[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: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v5.0, v4.4
|
||||||||||||
| Sprint: | Repl 2021-10-04 | ||||||||||||
| Participants: | |||||||||||||
| Case: | (copied to CRM) | ||||||||||||
| 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: (cherry picked from commit 8675c70fd480557fd1c5c9b3ce9e731b1101f93f) |
| Comment by Githook User [ 27/Sep/21 ] |
|
Author: {'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}Message: (cherry picked from commit 8675c70fd480557fd1c5c9b3ce9e731b1101f93f) |
| Comment by Githook User [ 24/Sep/21 ] |
|
Author: {'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}Message: |
| 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. |