-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
Sharding NYC
-
ALL
ShardingDataTransformMetrics uses atomic values to store start and end times for various phases. Since AtomicWord does not support boost::optional, a special value is used to indicate a date is not yet set.
The interface for accessing this date, however, makes no indication that the returned value may be invalid and instead returns it directly. This is confusing for callers, who may use the value expecting that it always represents a valid time.
The following functions should be updated to clearly indicate when their values are invalid (e.g. by returning boost::none when they are set to kNoDate):
- ShardingDataTransformInstanceMetrics::getCopyingBegin()
- ShardingDataTransformInstanceMetrics::getCopyingEnd()
- ReshardingMetrics::getApplyingBegin()
- ReshardingMetrics::getApplyingEnd()
Callers of these functions should also be updated to properly consider and handle invalid values.
- depends on
-
SERVER-73078 Implement MovePrimaryMetrics
- Closed
- related to
-
SERVER-70115 Resharding Coordinator and Recipient Persist Invalid Start/End Times to State Document
- Closed