-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
QE 2025-06-23
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently $regex can consume a lot of resources.
We need to limit RAM consumption to 100 MB and make it configurable.
We can use [https://www.pcre.org/current/doc/html/pcre2_set_heap_limit.html|pcre2_set_heap_limit] for that.
It also can search for a long time. We should also make match limit configurable, so pcre2 can give up earlier, if needed.
Lowering it by default can cause compatibility issues as some regexes can suddenly produce false-negatives, so currently we just want to introduce it as an option.
- related to
-
SERVER-82167 $regex may use unbounded cpu and memory
-
- Open
-