[SERVER-34551] Add failpoint to fail commands with network errors or arbitrary error codes Created: 18/Apr/18 Updated: 08/Jan/24 Resolved: 01/May/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Tess Avitabile (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||
| Sprint: | Repl 2018-05-07 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
To aid testing, especially for drivers, we should have a failpoint that can induce arbitrary command failures. Configuring such a failpoint would look like:
This failpoint will not be triggered for isMaster, configureFailPoint, or buildinfo. |
| Comments |
| Comment by Githook User [ 01/May/18 ] |
|
Author: {'email': 'tess.avitabile@mongodb.com', 'name': 'Tess Avitabile', 'username': 'tessavitabile'}Message: |
| Comment by Githook User [ 01/May/18 ] |
|
Author: {'email': 'billy.donahue@mongodb.com', 'name': 'Billy Donahue', 'username': 'BillyDonahue'}Message: The execCommandDatabase function is too large. |
| Comment by A. Jesse Jiryu Davis [ 26/Apr/18 ] |
|
Eventually mongos, but since our immediate need is to test transactions in replica sets, mongod-only is fine for now. |
| Comment by Tess Avitabile (Inactive) [ 26/Apr/18 ] |
|
jesse, shane.harvey, do you need this to work on mongos as well, or just mongod? |
| Comment by A. Jesse Jiryu Davis [ 19/Apr/18 ] |
|
Thanks for doing this so promptly, I think it'll meet our needs. |
| Comment by Spencer Brody (Inactive) [ 19/Apr/18 ] |
|
mira.carey@mongodb.com FYI this is coming this iteration. Please let me know if you have any concerns about this approach. We will make sure to put someone on platforms on the code review. |
| Comment by Spencer Brody (Inactive) [ 19/Apr/18 ] |
|
Yep, it has the same modes available as all failpoints, which includes a fixed number of failures. |
| Comment by A. Jesse Jiryu Davis [ 18/Apr/18 ] |
|
Great. And besides alwaysOn we can also configure an integer number of failures? |
| Comment by Shane Harvey [ 18/Apr/18 ] |
|
Yes, I believe we can use this API for those tickets. |
| Comment by Spencer Brody (Inactive) [ 18/Apr/18 ] |
|
jesse shane.harvey, does the API I put in the description match your needs, and eliminate the need for |