Doris-Breakwater commented on issue #71065: URL: https://github.com/apache/doris/issues/71065#issuecomment-7192256934
The source at `7d457d52b8` supports treating this as a BE log-volume bug in the `LIKE` fallback. Both `FunctionLike::construct_like_const_state` and `LikeSearchState::clone` create RE2 objects with default error logging. The scalar and vector evaluators call `RE2::PartialMatch` for each value they test. Bundled RE2 logs `DFA out of memory` when a DFA search fails under its memory budget, then continues matching with another engine. This can emit a line per evaluated row. Storage pushdown can also evaluate dictionary entries and reuse the results, so line counts depend on the execution path. The launcher appends stderr to `be.out`, where the missing rotation tracked in #71059 compounds the impact. [LIKE fallback](https://github.com/apache/doris/blob/7d457d52b823c15c3af2ff6b48f6330394d272a2/be/src/exprs/function/like.cpp#L971-L1010), [dictionary evaluation](https://github.com/apache/doris/blob/7d457d52b823c15c3af2ff6b48f6330394d272a2/be/src/storage/predicate/like_column_predicate.h# L158-L185), [RE2 match path](https://github.com/google/re2/blob/2021-02-02/re2/re2.cc#L744-L757), [launcher](https://github.com/apache/doris/blob/7d457d52b823c15c3af2ff6b48f6330394d272a2/bin/start_be.sh#L679-L691). - `split_by_regexp` uses the same logging defaults for constant and column patterns. It calls `RE2::Match` as it finds delimiters, so the expected unit there is a match attempt. The `REGEXP` predicate uses quiet options on the reported master commit after #68501. The public `4.1.4` tag still uses default logging for constant and dynamic `REGEXP` predicate fallbacks. The #68501 backport merged separately in #68591. [Split options](https://github.com/apache/doris/blob/7d457d52b823c15c3af2ff6b48f6330394d272a2/be/src/exprs/function/function_split_by_regexp.cpp#L229-L247), [master REGEXP change](https://github.com/apache/doris/pull/68501), [4.1.4 REGEXP fallback](https://github.com/apache/doris/blob/4.1.4/be/src/exprs/function/like.cpp#L1036-L1058), [4.1 backport](https://github.com/apache/doris/pull/68591). - The inverted-index prefix helper at `7d457d52b8` already sets `log_errors(false)`. Bundled RE2's `PossibleMatchRange` handles DFA budget exhaustion by giving up on the range or using a conservative bound from a known prefix. The older `4.1.4` prefix constructors can still log RE2 compilation errors. [Master prefix helper](https://github.com/apache/doris/blob/7d457d52b823c15c3af2ff6b48f6330394d272a2/be/src/storage/index/inverted/query/exec/term_pattern.cpp#L31-L44), [RE2 range handling](https://github.com/google/re2/blob/2021-02-02/re2/re2.cc#L555-L595), [4.1.4 prefix helper](https://github.com/apache/doris/blob/4.1.4/be/src/storage/index/inverted/query/regexp_query.cpp#L85-L100). Please open the patch as a PR. A shared quiet-options helper would address the confirmed logging sites while preserving each caller's matching flags and existing invalid-pattern behavior. Add small regression cases for expression `LIKE`, pushed-down `LIKE`, and `split_by_regexp` that check results and stderr. I reviewed the source. For end-to-end verification, please include the exact BE build, `EXPLAIN` and the pushdown and Hyperscan fallback settings where available, plus the result count and before/after diagnostic counts from a small run of the supplied SQL. Keep the 8 MiB default in the logging fix. RE2's `max_mem` covers both the compiled program and DFA caches per object, and multiple thread-local or scan predicate instances can hold caches at the same time. The reported benchmark makes a configurable budget worth evaluating. Before choosing 32 MiB as a default, measure CPU time and peak BE RSS at 8 and 32 MiB with stderr logging disabled in both runs, including concurrent queries with multiple scan segments. [RE2 budget and defaults](https://github.com/google/re2/blob/2021-02-02/re2/re2.h#L619-L660). Breakwater-GitHub-Analysis-Slot: slot_4de1ccc35684 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
