Expose serverStatus metric for oplog fetching lag on the primary

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Repl 2026-02-16
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We've had some cases where diagnosing the source of lag on the primary was challenging, because there can be many causes. One cause we have seen is that getMore cursors on the primary can't keep up with the rate of writes.

      I think it would be tremendously valuable to expose a metric in serverStatus about the getMore lag (time between lastApplied and last returned OpTime). This could be per-replica set node just a maximum of all nodes.

      I POCed something that I'll attach, but it doesn't care about multiple nodes (i.e. each update of the metric from overwrites the previous metric, which could have been a different node).

            Assignee:
            Denis Trailin
            Reporter:
            Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: