[SERVER-28923] Add diagnosability and supportability features for retryable writes Created: 21/Apr/17  Updated: 30/Oct/23  Resolved: 19/Jan/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.6.3, 3.7.2

Type: Task Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: PM-257, SWDI
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Documented
is documented by DOCS-11247 Docs for SERVER-28923: Add diagnosabi... Closed
Related
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-01-01, Sharding 2018-01-15, Sharding 2017-12-18, Sharding 2018-01-29
Participants:

 Description   

This ticket is a placeholder to figure out between ourselves and with TSE what supportability and diagnosability enhancements we might need to include for retryable writes.

Things that come to mind include:

  • FTDC metrics for number of active sessions
  • Metrics for the CPU (and if possible I/O) overhead of maintaining the retryability metadata
  • Metrics for number of writes which have been retried
  • If we end up with a cache, metrics for hit-rate


 Comments   
Comment by Githook User [ 19/Jan/18 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-28923 Add stats for retryable writes

(cherry picked from commit 9b6f404d30b944def9bcc77ebc8277fb97471080)
Branch: v3.6
https://github.com/mongodb/mongo/commit/6f34d6f693a379ac6490291b74e9e333d292fbc9

Comment by Jack Mulrow [ 19/Jan/18 ]

Since I'm not sure where the "docs needed" comment went, here's what I put when I resolved the ticket:

This ticket added a new section to the serverStatus response called "transactions" that contains 3 new fields:

  • "retriedCommandsCount"
    • The total number of received write commands with statements that have already been executed, across all sessions
  • "retriedStatementsCount"
    • The total number of received statements that have already been executed, across all sessions
  • "transactionsCollectionWriteCount"
    • The total number of writes to the config.transactions collection, triggered when a new retryable write statement is committed. For updates and deletes there is one write per statement, but there is only one per batch of documents inserted, except when there is a failure that leads to each document being inserted separately.

"retriedCommandsCount" and "retriedStatementsCount" both ignore any retryable writes that may happen internally as part of a chunk migration, but "transactionsCollectionWriteCount" does include writes to a server's config.transactions collection that occur as part of a migration. These fields exist on secondaries but are not incremented.

All three are NumberLongs and default to 0.

Comment by Githook User [ 18/Jan/18 ]

Author:

{'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'}

Message: SERVER-28923 Add stats for retryable writes
Branch: master
https://github.com/mongodb/mongo/commit/9b6f404d30b944def9bcc77ebc8277fb97471080

Generated at Thu Feb 08 04:19:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.