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

Allow specifying maxTransactionLockRequestTimeoutMillis per-transaction

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      When using Transactions, it is useful to control write timeouts avoid WriteConflict errors.

      From the MongoDB docs: https://docs.mongodb.com/manual/reference/parameters/#param.maxTransactionLockRequestTimeoutMillis

      5ms is quite low for my use case, I'm getting frequent WriteConflict errors I'd like to make it larger. My feedback here:

      1. It is not clear to me how to set operation specific timeout. It appears would use maxTimeMs or wtimeout , however many write operations such as "update" do not support this parameter. https://docs.mongodb.com/manual/reference/method/db.collection.update/index.html
      2. It would be nice to be able to set this parameter at the transaction level. Perhaps that would need to be done in the driver (and passed down to the individual operations)?
      3. The docs imply that even if you set an operation specific timeout, unless you've set maxTransactionLockRequestTimeoutMillis to -1, the max timeout will still be 5ms.
      4. If you set maxTransactionLockRequestTimeoutMillis to -1, does it still use 5ms as a default? Or 0? or Infinity?

       

            Assignee:
            judah.schvimer@mongodb.com Judah Schvimer
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: