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

withTxnAndAutoRetry() must retry commitTransaction command on FailedToSatisfyReadPreference error response

    • v5.3, v5.2, v5.0
    • 25
    • 3

      Some test suite configurations use withTxnAndAutoRetry() to automatically retry running a JavaScript function within a multi-statement transaction until it succeeds. However, the commitTransaction command may fail with a FailedToSatisfyReadPreference if there isn't a primary on the coordinator shard for kDefaultFindHostTimeout (15 seconds). This leads shouldRetryEntireTxnOnError() to end up failing with an uncaught JavaScript exception.

      We can probably add another case like this one in shouldRetryWithNetworkErrorOverride() to retry the commitTransaction on a FailedToSatisfyReadPreference error response.

            Assignee:
            andrew.witten@mongodb.com Andrew Witten (Inactive)
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: