-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
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 insert retry-detection call site for SERVER-107365 (retried writes latency histogram).
Site
src/mongo/db/query/write_ops/write_ops_exec.cpp (~L1324-1325, L1393-1397)
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 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
- is related to
-
SERVER-134421 Add metric definition for retryable write latency metric
-
- Closed
-
-
SERVER-134422 Add utility function for recording retryable write latency
-
- Closed
-