Store API parameters for serverStatus metrics

XMLWordPrintableJSON

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

      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
              Reporter:
              Pridhvi Vegesna (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: