[SERVER-64147] Ensure _completeOnError is set when necessary in all ShardingDDLCoordinator implementations Created: 03/Mar/22  Updated: 26/Oct/23

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

Type: Task Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: oldshardingemea, shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Catalog and Routing
Participants:
Story Points: 2

 Description   

The ShardingDDLCoordinator class automatically retries a list of retriable errors in order to guarantee forward progress until completion. However, there are two ways to alter such behavior: _mustAlwaysMakeProgress and _completeOnError. The latter is a flag that must be set to true whenever an expected error is detected on the instance, and the coordinator must finalize. This can be seen for example in renameCollection, where the initial verifications are performed and then the flag is set in case of an exception.

The purpose of this ticket is to ensure all implementations of the ShardingDDLCoordinator are properly using this flag, and then, ensure all future implementations handle this appropriately, by adding a dassert that will be hit when an instance violates the expected behavior.

Such assert can be added in the ShardingDDLCoordinator completion, something like:

dassert(status.isOK() || _completeOnError || isSteppingDown);


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