-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Cluster Scalability
The current implementation of metrics classes, specifically ShardingDataTransformInstanceMetrics and ShardingDataTransformCumulativeMetrics, serves as superclasses that are heavily customized by subclasses including ReshardingMetrics using C++ Mixins. This approach creates tight coupling to specific use cases, making the code complex and difficult to read. The mixin strategy complicates the understanding of how metrics are aggregated and reported across different operations and how they are restored on failovers.
A more effective approach might be to create lightweight core metrics classes that focus solely on reporting functions, allowing individual operations to track their own metrics internally.
This comment provides more discussion on this.