Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-3275

Add max retries in TransactionOptions

    • Type: Icon: New Feature New Feature
    • Resolution: Won't Do
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Transactions
    • None
    • Go Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      There is no simple way to configure the transaction retry policy. 

      The hardcoded policy will immediately retry transactions in case of transient errors 120 seconds.

       

      Transaction API can have a simple way to configure the retry policy. For example

      // TransactionOptions represents options that can be used to configure a transaction.
      type TransactionOptions struct { 
        ...
        // Number of max retries will be performed in case of TransactionTransientError, If 0, the number of retries is unknown and depends on timeout.
        MaxRetries int
      }

       

            Assignee:
            preston.vasquez@mongodb.com Preston Vasquez
            Reporter:
            k.chaus@efg.gg Kos Chaus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: