[SERVER-40343] Better handling of errors from PCRE in $regex expressions Created: 26/Mar/19 Updated: 29/Oct/23 Resolved: 01/Apr/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.9 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Arun Banala | Assignee: | Arun Banala |
| 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: | Query 2019-04-08 | ||||||||
| Participants: | |||||||||
| Description |
|
During $regex* aggregate expression evaluation, errors thrown by 'pcre_exec' are not propagated. It might be incorrect in some cases when error was thrown because of a threshold breach. |
| Comments |
| Comment by Githook User [ 01/Apr/19 ] |
|
Author: {'email': 'arun.banala@mongodb.com', 'name': 'Arun Banala', 'username': 'banarun'}Message: |
| Comment by Arun Banala [ 27/Mar/19 ] |
|
Agreed. We will only change $regex agg expressions to throw errors. |
| Comment by David Storch [ 27/Mar/19 ] |
|
arun.banala bernard.gorman, to clarify: do you intend to change both the $regex* agg expressions and the $regex match expression to throw in this case? I don't think we should change the $regex match expression's behavior, since, with the exception of $expr, match expressions do not throw runtime errors. |