[SERVER-35662] Future::isReady() should use memory_order_acquire Created: 18/Jun/18 Updated: 29/Oct/23 Resolved: 02/Jul/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Mathias Stearn |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Platforms 2018-07-02 |
| Participants: |
| Description |
|
While the rationale for making it relaxed is probably valid for external callers, an internal caller[1] is already using it incorrectly. Rather than fixing the internal caller, it seems easier and less bug-prone to just make isReady() do an acquire-load. [1] That method is only called from its unittest at the moment, so there is no bug in the shipping binaries. |
| Comments |
| Comment by Githook User [ 02/Jul/18 ] |
|
Author: {'username': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: This fixes a data race in onError<ErrorCode>(...) that relies on isReady() |