v.21.9Improvement

Add Settings to Limit Regexp Size in Hyperscan Functions

Add two settings max_hyperscan_regexp_length and max_hyperscan_regexp_total_length to prevent huge regexp being used in hyperscan related functions, such as multiMatchAny. #27378 (Amos Bird).
Introduced two new settings, max_hyperscan_regexp_length and max_hyperscan_regexp_total_length, to limit the size of regular expressions used in Hyperscan-related functions like multiMatchAny.

Why it matters

These settings prevent the use of excessively large regular expressions in Hyperscan functions, which can help avoid performance degradation or resource exhaustion, ensuring more stable and efficient query execution.

How to use it

Users can configure the new settings max_hyperscan_regexp_length and max_hyperscan_regexp_total_length in the server config or query settings to set maximum allowed sizes for individual and total regexp lengths used by Hyperscan functions such as multiMatchAny.