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

Error details won't exist if transient transaction error is thrown when handling WouldChangeOwningShard error

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.11
    • None
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2019-04-22, Sharding 2019-05-06, Sharding 2019-05-20

    Description

      When handling a WouldChangeOwningShard error for a retryable write, we make a call to the ClusterWriter. In the case that we receive a transient transaction error, we bypass filling the BatchedCommandResponse object and its writeErrorDetails variable.

      Error handling in the WouldChangeOwningShard path assumes that the writeErrorDetails variable will be filled. But in this case, it will be a null pointer and will cause a segmentation fault. We should instead check if _writeErrorDetails exists, and if not, create it before populating the variable with the error status.

      Attachments

        Activity

          People

            blake.oler@mongodb.com Blake Oler
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: