[SERVER-48232] PCRE is not maintained anymore, upgrade to PCRE2 Created: 14/May/20 Updated: 29/Oct/23 Resolved: 27/Jun/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code, Querying |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Billy Donahue | Assignee: | Jennifer Peshansky (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Sprint: | QE 2022-04-04, QE 2022-03-21, QE 2022-04-18, QE 2022-05-02, QE 2022-05-16, QE 2022-05-30, QE 2022-06-13, QE 2022-06-27, QE 2022-07-11 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
The very strong recommendation from the PCRE author is to migrate to the successor, PCRE2, which is under active maintenance. It is compatible, but not bug-for-bug compatible. It provides a similar C API as PCRE, but does not ship with a C++ wrapper. C++ wrappers for PCRE2 are available from third parties, reflecting some diversity of style. Some are quite featureful, e.g., https://github.com/jpcre2/jpcre2 . The PHP project made this transition in 2018, and generated some compatibility notes. The main difference is that invalid regexes are more zealously rejected: We would have to consider what in the server could change in such an upgrade. src/mongo/db/matcher/expression_leaf.cpp: src/mongo/db/matcher/schema/expression_internal_schema_allowed_properties.h So query team would be best able to evaluate the impact of the upgrade. |