shuke987 opened a new pull request, #65527:
URL: https://github.com/apache/doris/pull/65527

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: #57177
   
   Problem Summary:
   
   `mtmv_with_sql_cache` intermittently required `mtmv_sql1` to miss SQL cache 
after refreshing `mv_name1`. However, the case rebuilt that cache after `INSERT 
OVERWRITE` while the MTMV was stale. The cached physical plan could therefore 
scan only the two base tables. Refreshing the MTMV did not change either 
recorded base-table version, so retaining that cache entry was valid.
   
   This change removes only that invalid cache-residency assumption while 
preserving the original test coverage:
   
   - cache entries whose real base-table or MTMV dependencies change still must 
miss;
   - with SQL cache disabled, the refreshed MTMV must be chosen for `mtmv_sql1` 
rewrite;
   - cached and uncached executions must return identical results.
   
   The failure was observed in P0 build 992833, occurrence 2000001579, with the 
same original line 768 and base-table `PhysicalSqlCache` plan seen in earlier 
muted failures.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
           - Runtime rerun is pending; this PR is intentionally opened as draft.
       - [ ] Unit Test
       - [x] Manual test (add detailed scripts or steps below)
           - `git diff --check`
           - Verified `mv_rewrite_success` bypasses SQL cache here and checks 
`.<mv_name> chose` through the existing memo-plan helper.
           - Verified the surrounding base-table, direct-MTMV, and nested-MTMV 
cache invalidation assertions remain unchanged.
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [x] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   


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