Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-95238

Refactor Resharding Metrics for Enhanced Readability and Modularity

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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.

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: