[SERVER-77573] avoid copying invalid iterator in StreamableReplicaSetMonitor Created: 30/May/23 Updated: 07/Jul/23 Resolved: 07/Jul/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | [DO NOT USE] Backlog - Sharding NYC |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Sharding NYC
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 37 | ||||||||||||
| Description |
|
Fixes BF-28895. The GLIBCXX_DEBUG macros complain about making a copy of an invalidated iterator, whether you use it or not. We copy a potentially invalid iterator here, but we don't use it unless other conditions indicate that the bound copy is still valid. We don't use it, but the instrumentation doesn't know that. It just complains about the copy, so we can conditionally copy to fix this problem. |
| Comments |
| Comment by Billy Donahue [ 31/May/23 ] |
|
more details in BF-28895. I don't understand how the iterator could be invalidated between lines 417 and 422. |