[SERVER-69775] Rename the _executePhase() method of ShardingDDLCoordinator to reduce the probability of misuses. Created: 16/Sep/22  Updated: 29/Oct/23  Resolved: 17/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Paolo Polato Assignee: Paolo Polato
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-10-31, Sharding EMEA 2022-11-14, Sharding EMEA 2022-11-28
Participants:

 Description   

The _executePhase() method of ShardingDDLCoordinator is deceiving: it takes in a DDL Phase value and a callable object to implement the handling of such phase, but it does not actually invoke the received functor - instead, it returns a decorated version of it, and the caller of _executePhase() is then responsible to trigger the execution phase when appropriate.

This misleading name has caused some hard to diagnose issue in the past - and the problem may be fixed with a simple refactoring.



 Comments   
Comment by Githook User [ 16/Nov/22 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-69775 Rename builder function for DDL phase handlers
Branch: master
https://github.com/mongodb/mongo/commit/925eaf9e18d9f560d4dbd0aaf6c86c2cde6e52d4

Generated at Thu Feb 08 06:14:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.