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

Don't allow txnNumbers in commands for standalone mongods

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.6.0-rc0
    • 3.5.11
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • 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")}})
    • Sharding 2017-10-02
    • 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

        Activity

          People

            jack.mulrow@mongodb.com Jack Mulrow
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: