[SERVER-57451] TopologyDescription::clone should make a deep copy of the ServerDescriptions Created: 04/Jun/21 Updated: 29/Oct/23 Resolved: 07/Sep/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Haley Connelly | Assignee: | Luis Osta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Sharding 2021-07-12, Sharding 2021-07-26, Sharding 2021-08-09, Sharding 2021-08-23 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 24 | ||||||||||||||||
| Description |
|
Task: Before associating the server descriptions to the cloned TopologyDescription, the result (cloned) TopologyDescription’s _servers should deep copied. Context: TopologyDescription::clone currently makes a shallow copy of the source TopologyDescription. The result’s _servers point to the same underlying ServerDescriptions as the source’s _servers. This becomes an issue since the method mutates the underlying _servers for the source TopologyDescription as well as the result (cloned) version - causing unexpected changes when readers (primarily the ServerSelector) expect the TopologyDescription to be readonly. |
| Comments |
| Comment by Vivian Ge (Inactive) [ 06/Oct/21 ] |
|
Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you! |
| Comment by Githook User [ 07/Sep/21 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |