Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-37189

transactions.currentActive has a value of -1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 4.0.2, 4.1.2
    • Fix Version/s: 4.0.6, 4.1.6
    • Component/s: Diagnostics, Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0
    • Steps To Reproduce:
      Hide

      on a secondary:

      sessionOptions = {causalConsistency: false}
      sess = db.getMongo().startSession(sessionOptions)
      sess.startTransaction()
      db.serverStatus({ repl: 0, metrics: 0, locks: 0, wiredTiger: 0 })
      db.abc.insert({_id:213})
      sess.getDatabase("test").abc.insert({_id: "insert-4"}) // this had a "TransientTransactionError"
      db.serverStatus({ repl: 0, metrics: 0, locks: 0, wiredTiger: 0 })
      sess.getDatabase("test").abc.insert({_id: "insert-4"}) // this had a "TransientTransactionError"
      db.serverStatus({ repl: 0, metrics: 0, locks: 0, wiredTiger: 0 })
      

      Show
      on a secondary: sessionOptions = {causalConsistency: false } sess = db.getMongo().startSession(sessionOptions) sess.startTransaction() db.serverStatus({ repl: 0, metrics: 0, locks: 0, wiredTiger: 0 }) db.abc.insert({_id:213}) sess.getDatabase( "test" ).abc.insert({_id: "insert-4" }) // this had a "TransientTransactionError" db.serverStatus({ repl: 0, metrics: 0, locks: 0, wiredTiger: 0 }) sess.getDatabase( "test" ).abc.insert({_id: "insert-4" })  // this had a "TransientTransactionError" db.serverStatus({ repl: 0, metrics: 0, locks: 0, wiredTiger: 0 })
    • Sprint:
      Repl 2018-10-22, Repl 2018-11-05, Repl 2018-11-19
    • Linked BF Score:
      0

      Description

      Got a value of -1 for the currentActive transactions when running serverStatus against a replica set secondary.

      "transactions" : {
       "retriedCommandsCount" : NumberLong(0),
       "retriedStatementsCount" : NumberLong(0),
       "transactionsCollectionWriteCount" : NumberLong(0),
       "currentActive" : NumberLong(-1),
       "currentInactive" : NumberLong(1),
       "currentOpen" : NumberLong(0),
       "totalAborted" : NumberLong(1),
       "totalCommitted" : NumberLong(0),
       "totalStarted" : NumberLong(1)
      }
      

        Attachments

        1. txns_secondary_metrics.js
          2 kB
          William Schultz

          Issue Links

            Activity

              People

              Assignee:
              tess.avitabile Tess Avitabile
              Reporter:
              isabella.siu Isabella Siu (Inactive)
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: