[SERVER-40792] Error details won't exist if transient transaction error is thrown when handling WouldChangeOwningShard error Created: 23/Apr/19 Updated: 29/Oct/23 Resolved: 08/May/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.11 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Blake Oler | Assignee: | Blake Oler |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Sharding 2019-04-22, Sharding 2019-05-06, Sharding 2019-05-20 |
| Participants: |
| 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. |
| Comments |
| Comment by Githook User [ 08/May/19 ] |
|
Author: {'name': 'Blake Oler', 'username': 'BlakeIsBlake', 'email': 'blake.oler@mongodb.com'}Message: |