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

Don't allow txnNumbers in commands for standalone mongods

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.5.11
    • Fix Version/s: 3.6.0-rc0
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      ./mongod
      ./mongo
      db.runCommand({insert: "foo", documents: [{x: 1}], txnNumber: NumberLong(1), lsid: {id: UUID("0123456789abcdef0123456789ABCDEF")}})
      

      Show
      ./mongod ./mongo db.runCommand({insert: "foo", documents: [{x: 1}], txnNumber: NumberLong(1), lsid: {id: UUID("0123456789abcdef0123456789ABCDEF")}})
    • Sprint:
      Sharding 2017-10-02
    • Linked BF Score:
      0

      Description

      If a standalone mongod receives a write command with a valid txn number and logical session id, it will assign a statement id to each write, but because isOplogDisabledFor will always return false, since replication is not enabled, this invariant will be hit here.

      I'm not completely sure the invariant even needs to stay, since statement ids are only used after this check for inserting to the oplog, but regardless, since retryable writes aren't supported on standalone mongods, a command with a txn number should return a bad status instead of crashing the node.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jack.mulrow Jack Mulrow
              Reporter:
              jack.mulrow Jack Mulrow
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: