[SERVER-36231] Mongos write path doesn't look for retryable write concern errors Created: 20/Jul/18 Updated: 29/Oct/23 Resolved: 25/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.12, 4.0.7, 4.1.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jack Mulrow | Assignee: | Randolph Tan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.0, v3.6
|
||||||||
| Sprint: | Sharding 2019-01-28, Sharding 2019-02-11 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 12 | ||||||||
| Description |
|
If a node steps down while waiting for write concern, it can return a PrimarySteppedDown error code in the WriteConcernError field in its command response. PrimarySteppedDown is treated as a retryable error in the AsyncRequestsSender (for the kIdempotent retry policy), but the ARS doesn't look for retryable errors in the WriteConcernError field. This means that retryable writes (writes with a txnNumber) won't automatically be retried by mongos if a failover led to a write concern error, because they rely on the ARS to retry them. The replica set monitor for the targeted shard should also be updated, since if there was a retry attempt, it would target the old primary. For reference, ShardRemote::_runCommand does inspect write concern errors and update the replica set monitor for them. |
| Comments |
| Comment by Githook User [ 05/Mar/19 ] |
|
Author: {'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}Message: (cherry picked from commit 9df4dbcffefe8f9cf2d669603f230c1f44ac5652) |
| Comment by Githook User [ 21/Feb/19 ] |
|
Author: {'name': 'Randolph Tan', 'username': 'renctan', 'email': 'randolph@10gen.com'}Message: (cherry picked from commit 9df4dbcffefe8f9cf2d669603f230c1f44ac5652) |
| Comment by Kaloian Manassiev [ 25/Jan/19 ] |
|
renctan, there is a commit here - should this be closed now? See also Kelsey's question about backporting. |
| Comment by Githook User [ 16/Jan/19 ] |
|
Author: {'username': 'renctan', 'email': 'randolph@10gen.com', 'name': 'Randolph Tan'}Message: |