[SERVER-77730] Avoid data race when calculating getApproximateSize of DocumentStorage::kEmptyDoc Created: 02/Jun/23 Updated: 29/Oct/23 Resolved: 14/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Ivan Fefer | Assignee: | Ivan Fefer |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Sprint: | QE 2023-06-12, QE 2023-06-26 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 135 | ||||||||||||
| Description |
|
As kEmptyDoc is a global constant, several thread can end up calling getApproximateSize() on it causing a mostly harmless, but data race, that is triggering thread sanitizers. Ideally, we can initialize it once during creating to avoid it |
| Comments |
| Comment by Githook User [ 13/Jun/23 ] |
|
Author: {'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}Message: |