[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:
Related
is related to SERVER-37848 Test $regexFind with regex that meets... Closed
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: SERVER-40343 Better handling of errors from PCRE in $regex expressions
Branch: master
https://github.com/mongodb/mongo/commit/1d8ddd2d2d480bc0b840b506c3630c82be8c09a2

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.

Generated at Thu Feb 08 04:54:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.