Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-764

Change mongos pinning test to use a code other than MaxTimeoutMSExpired for unpinning

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • None

      In https://jira.mongodb.org/browse/SPEC-1206, the treatment of MaxTimeMSExpired (code=50) changed to be an UnknownTransactionCommitResult (https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst#unknowntransactioncommitresult):

      > The driver MUST add the "UnknownTransactionCommitResult" error label when commitTransaction fails with a server selection error, network error, retryable writes error,** MaxTimeMSExpired error,** or write concern failed / timeout.

      Existing unpinning requirements require to unpin upon an UnknownTransactionCommitResult (https://github.com/mongodb/specifications/blob/master/source/transactions/transactions.rst#when-to-unpin):

      > Additionally, drivers MUST unpin a ClientSession when any individual commitTransaction command attempt fails with an UnknownTransactionCommitResult error label.

      However, the pinning test in https://github.com/mongodb/specifications/blob/master/source/transactions/tests/pin-mongos.yml#L330 still uses MaxTimeMSExpired error code (50) and requires that the session is NOT unpinned. This test appears to contradict the current spec language requirements.

            Assignee:
            Unassigned Unassigned
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: