[SERVER-34665] The mongo shell should retry writes on a WriteConcernFailure error response from the server Created: 25/Apr/18 Updated: 29/Oct/23 Resolved: 27/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.5, 4.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Max Hirschhorn |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Backport Requested: |
v3.6
|
||||||||||||||||
| Sprint: | TIG 2018-05-07 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
At the time when
There is now a list of retryable errors which permits the following definition for isRetryableCode():
Furthermore, the runClientFunctionWithRetries() function in src/mongo/shell/session.js must explicitly trigger retargeting when using a replica set connection and a non-"not master" error response is returned before attempting its retry. The mongo shell would otherwise always retry sending the command request to the server that is in the process of stepping down or has stepped down already. The desired behavior can be achieved by exposing a way to call ReplicaSetMonitor::failedHost() from JavaScript. |
| Comments |
| Comment by Githook User [ 06/May/18 ] |
|
Author: {'email': 'kyle.suarez@mongodb.com', 'name': 'Kyle Suarez', 'username': 'ksuarz'}Message: (cherry picked from commit 7395b5fc63646c0499fffd887aae70f79e5f7049) |
| Comment by Githook User [ 06/May/18 ] |
|
Author: {'email': 'max.hirschhorn@mongodb.com', 'name': 'Max Hirschhorn', 'username': 'visemet'}Message: Also exposes a way to explicitly trigger retargeting before the next (cherry picked from commit c7d12379bcd047c923b72bd29ac99d05edfbb82a) |
| Comment by Githook User [ 01/May/18 ] |
|
Author: {'email': 'kyle.suarez@mongodb.com', 'name': 'Kyle Suarez', 'username': 'ksuarz'}Message: |
| Comment by Kyle Suarez [ 01/May/18 ] |
|
The Githook User is slacking today. Commit for test fix: https://github.com/mongodb/mongo/commit/7395b5fc63646c0499fffd887aae70f79e5f7049 |
| Comment by Githook User [ 27/Apr/18 ] |
|
Author: {'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet', 'name': 'Max Hirschhorn'}Message: Also exposes a way to explicitly trigger retargeting before the next |