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

Store API parameters for serverStatus metrics

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • Repl 2020-08-10, Repl 2020-08-24

      Breaking up SERVER-49379 into smaller tickets. This is the first.

      Like serverStatus metrics for elections, create a class ApplicationApiVersionMetrics. An instance of this class will be stored as a decoration on service context. Use ReplicationMetrics as reference. 

      The class should be populated with the field “appNameVersionTimestamps” of type: map<applicationName, <apiVersion, latest-timestamp>>. Define a mutex as a private field in the class. Lastly, add a member function addVersionTimestamp(applicationName, apiVersion) which acquires the mutex and writes a timestamp to an (applicationName, apiVersion) pair in "appNameVersionTimestamps". 

      In execCommandDatabase of service_entry_point_common.cpp and in runCommand of strategy.cpp, invoke “addVersionTimestamp”.  

       

            Assignee:
            xuerui.fa@mongodb.com Xuerui Fa
            Reporter:
            pridhvi.vegesna@mongodb.com Pridhvi Vegesna (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: