[SERVER-55306] Integrate CancelableOperationContext into ReshardingCollectionCloner Created: 18/Mar/21 Updated: 29/Oct/23 Resolved: 25/Mar/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | PM Bot | Assignee: | Janna Golden |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-234-M3, PM-234-T-error-flow, autogen-todo | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Sharding 2021-04-05 | ||||||||
| Participants: | |||||||||
| Story Points: | 1 | ||||||||
| Description |
|
The ReshardingCollectionCloner::_withTemporaryOperationContext() method and its lengthy doc comment can be removed. Consider introducing a slim CancelableOperationContextFactory class to avoid the repetition with constructing the CancelableOperationContext by enabling callers to write auto opCtx = factory.makeOperationContext(&cc()); instead.
There is a TODO in the codebase referencing a resolved ticket which is assigned to you. Please follow this link to see the lines of code referencing this resolved ticket: The next steps for this ticket are to either remove the outdated TODO or follow the steps in the TODO if it is correct. If the latter, please update the summary and description of this ticket to represent the work you're actually doing. |
| Comments |
| Comment by Githook User [ 02/Apr/21 ] |
|
Author: {'name': 'Alex Taskov', 'email': 'alex.taskov@mongodb.com', 'username': 'alextaskov'}Message: |
| Comment by Githook User [ 25/Mar/21 ] |
|
Author: {'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}Message: |
| Comment by Max Hirschhorn [ 19/Mar/21 ] |
|
I think we should add a std::shared_ptr<ThreadPool> _markKilledExecutor member to RecipientStateMachine and initialize it as a thread pool of at most size 1. We need a separate thread to always be available to run the markKilled() continuation that is chained onto CancelationToken::onCancel() by CancelableOperationContext. In particular, we cannot use the scoped task executor because it may not have any threads available to run a new task when the CancelationToken is canceled. |