[SERVER-60920] Ensure that BalancesCommandsScheduler synchs on every outstanding command before completing its stop() routine Created: 22/Oct/21 Updated: 29/Oct/23 Resolved: 01/Mar/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | Backlog |
| Fix Version/s: | 6.0.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Paolo Polato | Assignee: | Paolo Polato |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | shardingemea-qw | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Sprint: | Sharding EMEA 2022-02-07, Sharding EMEA 2022-02-21, Sharding EMEA 2022-03-07 | ||||
| Participants: | |||||
| Description |
|
The stop() routine of BalancerCommandsScheduler is currently relying on a "fire&forget" strategy to cancel every outstanding request. While this minimises the execution time of the method, it exposes the class to potential data races in case remote responses to cancelled requests were still received after destroying the Scheduler. A more robust alternative consists on synching on the reception of every response during the stop() of the scheduler. |
| Comments |
| Comment by Githook User [ 01/Mar/22 ] |
|
Author: {'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}Message: |