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

Create serverStatus metrics for readConcern and writeConcern

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.11, 4.0.6, 4.1.8
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • v4.0, v3.6
    • Repl 2019-01-28

      We will create new serverStatus sections:

       
      opReadConcernCounters: {
          available: <num>,
          linearizable: <num>,
          local: <num>,
          majority: <num>,
          snapshot: <num>,
          none: <num>
      }
      

      The sum of these counters should be opCounters.query (note that this means we will not include getMore commands, since these inherit the readConcern from the originating command).

      opWriteConcernCounters: {
          insert: {
              wmajority: <num>,
              wnum: {
                  "0": <num>,    // only generate these fields if they are used
                  "2": <num>,
                  ...
              },
              wtag: {
                  "tag1": <num>,    // only generate these fields if they are used
                  "tag2": <num>,
                  ...
              }
              none: <num>
          },
          update: {
              wmajority: <num>,
              wnum: {
                  "0": <num>,    // only generate these fields if they are used
                  "2": <num>,
                  ...
              },
              wtag: {
                  "tag1": <num>,    // only generate these fields if they are used
                  "tag2": <num>,
                  ...
              }
              none: <num>
          },
          delete: {
              wmajority: <num>,
              wnum: {
                  "0": <num>,    // only generate these fields if they are used
                  "2": <num>,
                  ...
              },
              wtag: {
                  "tag1": <num>,    // only generate these fields if they are used
                  "tag2": <num>,
                  ...
              }
              none: <num>
          }
      }
      

      The sum of the counters for opWriteConcernCounters.insert should be opcounters.insert, and similarly for the other operations. Note that the j value is ignored, so {w: 1, j: true} and {w:1, j:false} are both counted in w1.

            Assignee:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Reporter:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: