Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12634

Docs for SERVER-40105: Improve diagnostic information in currentOp for excessive write conflicts and prepare conflicts

      Description

      Description:

      The top-level fields 'writeConflicts' and 'prepareReadConflicts' are now present in the currentOp() output.

      The number of write conflicts represents the number of times a write attempt conflicted with another operation on the same document.

      The number of prepare conflicts represents the number of times the operation blocked waiting for a write by a prepared transaction to commit or abort. An operation blocked on prepare conflicts holds both locks and storage engine resources while waiting.

      Engineering Ticket Description:

      Currently, when a non-transactional write conflicts with an active transaction, that write may keep retrying thousands of times until the transaction finally commits or aborts. This situation is hard to diagnose, because currentOp doesn't show that the active non-transactional writes have occurred so many retries.

      Changes made by this ticket:
      The top-level fields 'writeConflicts' and 'prepareReadConflicts' are now present in the currentOp() output.

      The number of write conflicts represents the number of times a write attempt conflicted with another operation on the same document.

      The number of prepare conflicts represents the number of times the operation blocked waiting for a write by a prepared transaction to commit or abort. An operation blocked on prepare conflicts holds both locks and storage engine resources while waiting.

      Scope of changes

      • currentOp command and $currentOp pipeline stage
      • 4.2 rel notes
      • link in transactions considerations page.

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              4 years, 48 weeks, 2 days ago