ExportXMLWordPrintableJSON

    • Replication
    • Fully Compatible
    • Repl 2026-09-28
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      *This summary was written by AI and I do not endorse it: *

      Summary

      Wire retry-delay recording at the bulkWrite insert retry-detection call site for SERVER-107365 (retried writes latency histogram).

      Site

      src/mongo/db/commands/query_cmd/bulk_write.cpp (~L849)

      This site only checks a bool today. Use the cheap accessor

      checkStatementExecutedAndGetOpTime(opCtx, stmtId)

      to get the original write's opTime, compute

      millis = Date_t::now() - opTime.getTimestamp()

      , and call

      RetryableWritesStats::get(opCtx)->recordRetriedWriteDelay(millis)

      alongside incrementRetriedStatementsCount().

      Test

      Add one test asserting a retried bulkWrite insert lands one sample in the expected bucket (SERVER-107365 Task 3: one test per call site).

      References

      • SERVER-107365 (Add Metrics for Retried Writes)
      • Prereqs: SERVER-134421 (metric definition), SERVER-134422 (record helper), Task 2 accessor checkStatementExecutedAndGetOpTime

            Assignee:
            Indy Prentice
            Reporter:
            Indy Prentice
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: