Add cursor optime metrics to mongoS

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Follow-up to SERVER-122364.

      For mongoS we must aggregate the following lag-related metrics at the cursor-level retrieved from shards:

      • "changeStreams.cursor.optime"
        • The optime of the latest event that we've sent or the current 'high-watermark'.
      • "oplog.earliestTime"
        • The smallest optime across all shard oplogs.
      • "oplog.latestTime"
        • The largest optime across all shard oplogs.

      An important implementation decision is when to update the metrics, since some of the oplog scanning functionality is done by the classic find-subsystem. A viable option is to do this in the earliest change stream stage of the aggregation pipeline ($_internalChangeStreamOplogMatch).

            Assignee:
            Unassigned
            Reporter:
            Lyublena Antova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: