[SERVER-51283] Add CancelationTokens to scheduleExhaustCommand APIs in TaskExecutor Created: 01/Oct/20 Updated: 29/Oct/23 Resolved: 18/Feb/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Matthew Saltz (Inactive) | Assignee: | Tyler Seip (Inactive) |
| 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: | Service Arch 2021-02-22 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 35 | ||||||||||||||||||||
| Story Points: | 3 | ||||||||||||||||||||
| Description |
|
This ticket is to add CancelationToken-accepting/future-returning versions of these two functions. Adding CancelationTokens is straightforward, but since the callback is called multiple times, it's not as straightforward to make them return futures which are signaled when they are done, which is why this ticket is separate from |
| Comments |
| Comment by Githook User [ 18/Feb/21 ] |
|
Author: {'name': 'Tyler Seip', 'email': 'Tyler.Seip@mongodb.com', 'username': 'tseip-mongo'}Message: |
| Comment by Matthew Saltz (Inactive) [ 22/Dec/20 ] |
|
After investigation, I think it won't be so bad. Mostly I think we just need to signal the returned future when the moreToCome flag is set to false on a response. So the returned future will be resolved when the whole exhaust command has finished, and the CancelationToken will be used to cancel the entire exhaust command (not an individual callback). |
| Comment by Matthew Saltz (Inactive) [ 19/Nov/20 ] |
|
It's unclear whether this is needed or how difficult it will be. There might be a need for a large-scale refactoring for exhaust in order fo this to be possible in which case we might want to not do it. I also don't think we'll add many new uses of these functions but I'm not sure. |