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

client side Wtimeout parameter in writeConcern not being honored during sharded transactions

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • ALL

      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.

            Assignee:
            backlog-server-cluster-scalability [DO NOT USE] Backlog - Cluster Scalability
            Reporter:
            vishnu.kaushik@mongodb.com Vishnu Kaushik
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: