[SERVER-54988] Improper use of map::operator[] Created: 05/Mar/21 Updated: 29/Oct/23 Resolved: 06/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Daniel Gottlieb (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Sharding 2021-03-08 | ||||
| Participants: | |||||
| Linked BF Score: | 58 | ||||
| Description |
|
A pin lookup for a request uses operator[] which, as we all know, instantiates a default constructed version of the value type. A successful pin isn't bothered by this default construction (the default constructed value will be overwritten), but a failing pin should leave the key/value non-existent (if that was the pre-state). Failure to do so makes it seem as if there's a pin request when there is none. |
| Comments |
| Comment by Githook User [ 06/Mar/21 ] |
|
Author: {'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}Message: |