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: