[SERVER-62377] withTxnAndAutoRetry() must retry commitTransaction command on FailedToSatisfyReadPreference error response Created: 05/Jan/22 Updated: 06/May/22 Resolved: 31/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.2, 5.0.9 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Andrew Witten (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | sharding-nyc-subteam2, sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backport Requested: |
v5.3, v5.2, v5.0
|
||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 25 | ||||||||||||||||||||||||
| Story Points: | 3 | ||||||||||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 28/Jan/22 ] |
|
Author: {'name': 'Andrew Witten', 'email': 'andrew.witten@mongodb.com', 'username': 'awitten1'}Message: |