change stream getMores inconsistently increment collStats

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • ALL
    • QE 2024-11-25, QE 2024-12-09, QE 2024-12-23, QE 2025-01-06, QE 2025-01-20, QE 2025-02-03, QE 2025-02-17, QE 2025-03-03, QE 2025-03-17, QE 2025-03-31, QE 2025-04-14, QE 2025-04-28
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      when you open a change stream the aggregation command affects the latencyStats.reads on the oplog but subsequent getMore commands increment latencyStats.reads on the collection being watched despite not actually reading from that collection.

      the bug may or may not be here https://github.com/mongodb/mongo/blob/f17987ea0fc43ad4d3b34dedd39336f0faac734c/src/mongo/db/commands/query_cmd/getmore_cmd.cpp#L674 when we create an AutoStatsTracker for the command namespace and not the cursor's namespace

            Assignee:
            Daniel Tabacaru
            Reporter:
            Mickey Winters
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: