[SERVER-57088] Integrate CancelationTokens with the AsyncRequestsSender Created: 20/May/21  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Matthew Saltz (Inactive) Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: sa-remove-fv-backlog-22
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-50342 Make version of Shard::runCommand tha... Open
Assigned Teams:
Service Arch
Participants:

 Description   

Right now the AsyncRequestsSender has a stopRetrying method that sets a boolean flag which prevents requests from retrying, but it does not cancel outstanding network requests. We should change it to use cancellation tokens, which would allow us to cancel in flight requests and return sooner. As part of this we should update this call to scheduleRemoteCommand to use the newer future-returning version of that API that takes a cancellation token.

I'm creating this ticket as a prerequisite for SERVER-50342 (create a generic async runCommand), since doing the "modernization" of the ARS and refactoring it into a reusable function seemed like too much to do in one go.


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