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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.1.11
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2019-04-22, Sharding 2019-05-06, Sharding 2019-05-20
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Blake Oler
            Reporter:
            Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: