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

Large Transaction Causes Write Conflict Error Instead of Transaction Too Large For Cache

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Execution Team 2025-02-03

      Attempting to execute a transaction which updates a number of documents that causes the WiredTiger dirty cache ratio to significantly exceed 20% results in a write conflict error instead of a transaction too large for cache error. 

      In testing on an Replica Set, I was unable to trigger a transactionTooLargeForCache error even though FTDC reported that the cluster's dirty cache ratio exceeded 90% and there was no other additional workload happening.

       


      Repro

      Dependencies:

      // Create Collection via mongo-mangler from Command Line
      python3 mongo-mangler.py -m mongodb+srv://myDatabaseUser:D1fficultP%40ssw0rd@cluster0.example.mongodb.net/ -s 500000 -p ~/mongo_mangler/mongo-mangler-add-more-pipelines/examples/pipeline_example_fake_accounts_one_kb_doc.js  
      
      //Connect to Cluster via mongosh
      [primary] test> session = db.getMongo().startSession( { readPreference: { mode: "primary" } } );
      
      [primary] test> session.startTransaction( { readConcern: { level: "local" }, writeConcern: { w: "majority" } } ); coll = session.getDatabase("test").big_collection;try { coll.updateMany( {dependent_count: 1}, {$set: {recent_payment: 2421.24}} ); } catch (error) { session.abortTransaction(); print(error); }

            Assignee:
            sandeep.dhoot@mongodb.com Sandeep Dhoot
            Reporter:
            matt.panton@mongodb.com Matt Panton
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: