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

Don't check Context expiration in WithTransaction

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.10.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed

      Currently it's possible for a WithTransaction call to return an error when the context is canceled or times out that does not indicate that the error is related to the context expiring.

      Consider the context "done" check in WithTransaction here. If the context expires while handling an error unrelated to context expiration (e.g. a transient server error), the returned error will not indicate that WithTransaction returned due to the context expiring. That is potentially confusing to users because the error returned from WithTransaction doesn't always specify why WithTransaction stopped retrying.

      Update WithTransaction to continue calling the provided anonymous function until it returns a non-retryable error. Expect that the anonymous function handles the context correctly and returns a non-retryable error when the context expires.

      This is an alternative to GODRIVER-2467 that can be completed in the v1.x driver.

            Assignee:
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: