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

Don't allow txnNumbers in commands for standalone mongods

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.0-rc0
    • Affects Version/s: 3.5.11
    • Component/s: Sharding
    • Labels:
      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

      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.

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

              Created:
              Updated:
              Resolved: