airborne12 commented on PR #67538:
URL: https://github.com/apache/doris/pull/67538#issuecomment-5630610272

   ### Why P0 Regression and cloud_p0 went red on `94d3ca3`, and what the new 
commit changes
   
   Both pipelines lost their backend to the same abort, and every suite 
scheduled afterwards failed for want of one (P0: 3466, cloud_p0: 66). The 
backend log names it:
   
   ```
   F20260911 12:42:47.687088 olap_scan_operator.cpp:550] Check failed: 
children.size() == 2
       @ doris::OlapScanLocalState::_should_push_down_function_filter()
       @ doris::ScanLocalStateBase::_normalize_function_filters()
   *** SIGABRT ... *** Current BE git commitID: 94d3ca3a1e ***
   ```
   
   The timestamps line up with a single query in this PR's new suite: 
`test_gram_regexp_like` sent `msg LIKE '%100!%%' ESCAPE '!'` at 12:42:47.665 
(P0) and 12:51:16.550 (cloud_p0), and the abort followed 22 ms and 52 ms later.
   
   **Cause.** `LIKE ... ESCAPE` reaches the scan node as a three-child call. 
The function-filter push-down understands only the two-child form -- it hands 
`LikeColumnPredicate` the raw pattern, which that predicate reads with the 
default backslash escaping -- and the assertion on the child count that guarded 
this stood in a path reachable from SQL. It is reachable only while 
`enable_function_pushdown` is on, which the pipeline randomises per session 
(`SessionVariable#initFuzzyModeVariables`), so the same suite aborted on this 
head and not on the previous one: P0 on `9398c38` failed 1 test, cloud_p0 
failed 2. Other PRs' P0 runs today are green, so this is not a master-wide 
problem. The assertion itself predates this PR (it is unchanged since #35803 / 
#61142); a release backend does not abort on it, but then it pushes the pattern 
down with the custom escape character silently dropped.
   
   **Fix** (`8dbd415`): the call is declined on its shape alone, before the 
function context is consulted, so the predicate is evaluated on the rows 
exactly as it was before this push-down was offered it.
   
   **Coverage.** 
`OlapScanOperatorBinlogPushDownTest.LikeWithACustomEscapeIsDeclinedInsteadOfAborting`
 pins the decline without depending on a session variable, and 
`test_gram_regexp_like` now turns `enable_function_pushdown` on around its two 
`ESCAPE` patterns and compares the answers with the index on and off, so the 
path is taken on every run rather than on the runs where the pipeline happens 
to randomise the variable on. Scoped to those two patterns deliberately: with 
the variable on, a LIKE becomes a storage-layer predicate and no longer reaches 
the gram index, which the profile assertions in the same suite require.
   
   Verified locally on a cloud-mode cluster: BE unit tests 1654 / 0 failures, 
all seven `inverted_index_p0/gram` suites pass, and the query that aborted now 
returns the same rows with the index on and off while the backend stays up.
   


-- 
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]

Reply via email to