-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
Sharding 2021-04-05
-
1
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.
class CancelableOperationContextFactory { public: CancelableOperationContextFactory(CancelationToken cancelToken, ExecutorPtr executor) : _cancelToken{std::move(cancelToken)}, _executor{std::move(executor)} {} CancelableOperationContext makeOperationContext(Client* client) const { return CancelableOperationContext{client->makeOperationContext(), _cancelToken, _executor}; } private: const CancelationToken _cancelToken; const ExecutorPtr _executor; };
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:
https://github.com/mongodb/mongo/search?q=SERVER-55102&type=Code
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.
- is related to
-
SERVER-55102 [resharding] Create a CancelableOperationContext type to bridge CancelationToken and OperationContext interrupt
- Closed