[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:
Related
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: SERVER-60920 BalancesCommandsScheduler completes every outstanding command before stopping
Branch: master
https://github.com/mongodb/mongo/commit/07d0be8c575c796065fdc18d05723bd92f66c8f2

Generated at Thu Feb 08 05:51:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.