[SERVER-46045] Return false in shouldActivateFailCommandFailPoint if the command does not have a valid namespace Created: 07/Feb/20 Updated: 29/Oct/23 Resolved: 10/Feb/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Cheahuychou Mao | Assignee: | Cheahuychou Mao |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Sharding 2020-02-24 | ||||
| Participants: | |||||
| Linked BF Score: | 6 | ||||
| Description |
|
shouldActivateFailCommandFailPoint is a predicate function for FailPoint::executeIf so it should never throw an error. With the current code, the function could throw an exception if the invocation does not have a valid namespace. This line should be wrapped in a try/catch and if an exception is caught, the function should return false since we do not want to enable failCommand anyway in that case. |
| Comments |
| Comment by Githook User [ 10/Feb/20 ] |
|
Author: {'name': 'Cheahuychou Mao', 'username': 'cheahuychou', 'email': 'cheahuychou.mao@mongodb.com'}Message: |