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

Wtimeout parameter in writeConcern not being honored during sharded transactions

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Cluster Scalability
    • ALL

    Description

      session.startTransaction({writeConcern: {w: 'majority', wtimeout: 5000}});
      sessionColl.insert({_id: 1});
      session.commitTransaction({writeConcern: {w: 'majority', wtimeout: 3000}});
      

      When running this through mongo shell on mongos, I don't see wtimeout showing up when I turn on high COMMAND verbosity on mongod on prepareTransaction and commitTransaction.

      So if we kill two nodes in a 3 node shard, then we will observe that the prepareTransaction / commitTransaction blocks indefinitely, since that is the default value of wtimeout.

      This is not the case if I run the above statements on a replica set (although the value of wtimeout used when committing is from startTransaction).

      Wtimeout is honored when running individual operations on a sharded cluster. For example, I see that a single insert operation with a w and wtimeout value has the writeConcern values respected.

      Attachments

        Activity

          People

            backlog-server-cluster-scalability Backlog - Cluster Scalability
            vishnu.kaushik@mongodb.com Vishnu Kaushik
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: