[SERVER-86326] Regression: Queries have started failing after upgrade to MongoDB 7 "Regular expression is invalid: pattern string is longer than the limit set by the application" Created: 06/Feb/24 Updated: 07/Feb/24 |
|
| Status: | Needs Verification |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 7.0.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Chris M | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Steps To Reproduce: | Make a query with a regex pattern longer than 16384. } |
| Participants: |
| Description |
|
After upgrading our database several of our queries started failing with the error message "Regular expression is invalid: pattern string is longer than the limit set by the application"
I've traced the relevant code to these following lines:
https://github.com/PCRE2Project/pcre2/blob/master/src/pcre2_compile.c#L10226C24-L10230
So I am fairly confident this problem was introduced with the following commit: https://github.com/mongodb/mongo/commit/468f41278b6b30aa602e81010cf7ef7973d97e4d
An option to change this limit via a config option would solve this regression for us. |