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

Primary server change detected duration logging can be misleading

    • Cluster Scalability
    • ALL

      The durationMillis value recorded when logging changes in the Primary state of a replica set is recording the time between subsequent instances of these messages. For example:

      {"t":{"$date":"2023-09-18T10:39:47.885-07:00"},"s":"I",  "c":"NETWORK",  "id":6006301, "ctx":"ReplicaSetMonitor-TaskExecutor","msg":"Replica set primary server change detected","attr":{"replicaSet":"replset","topologyType":"ReplicaSetNoPrimary","primary":"Unknown","durationMillis":3846}}
      
      {"t":{"$date":"2023-09-18T10:39:57.891-07:00"},"s":"I",  "c":"NETWORK",  "id":6006301, "ctx":"ReplicaSetMonitor-TaskExecutor","msg":"Replica set primary server change detected","attr":{"replicaSet":"replset","topologyType":"ReplicaSetWithPrimary","primary":"localhost:27017","durationMillis":10005}} 

      These duration values are misleading.

      We should either remove the durationMillis value from these messages, or have the value logged for duration better reflect the time required to determine that a change was detected.

            Assignee:
            rachita.dhawan@mongodb.com Rachita Dhawan
            Reporter:
            adam.harrison@mongodb.com Adam Harrison
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: