Skip to content

branch-4.1:[fix](mtmv) Refresh MTMV after excluded trigger tables change (#64041) - #67267

Merged
yiguolei merged 1 commit into
apache:branch-4.1from
seawinde:pr_64041_to_branch-4.1
Aug 28, 2026
Merged

branch-4.1:[fix](mtmv) Refresh MTMV after excluded trigger tables change (#64041)#67267
yiguolei merged 1 commit into
apache:branch-4.1from
seawinde:pr_64041_to_branch-4.1

Conversation

@seawinde

Copy link
Copy Markdown
Member

pr: #64041
commitId: 3d5cee2

…#64041)
### What problem does this PR solve?
Related PR: apache#64041
Problem Summary:
Changing the effective `excluded_trigger_tables` set changes which base tables
participate in MTMV freshness decisions. Reusing the old `refreshSnapshot` can
make a later AUTO refresh skip work under the new exclude rules, leaving MV
data based on the old snapshot.
`MTMVTask.calculateNeedRefreshPartitions()` called `isMTMVSync()` before
verifying whether the refresh baseline was still complete. After altering
`excluded_trigger_tables`, the new rules could skip changed base tables and
incorrectly mark the MV as fresh.
Detect effective excluded table set changes, bump `schemaChangeVersion`, and
clear the refresh snapshot. AUTO refresh now treats an incomplete snapshot as
requiring a complete refresh before checking synchronization. Manual
specified-partition refresh keeps its existing behavior.
### Release note
Changing `excluded_trigger_tables` now rebuilds the MTMV refresh baseline on
the next AUTO refresh.
### Check List (For Author)
- Test: Unit Test
- `MTMVTest`
- `MTMVTaskTest`
- Behavior changed: Yes, AUTO refresh rebuilds an invalidated MTMV baseline
- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@seawinde

Copy link
Copy Markdown
MemberAuthor

run buildall

@yiguolei
yiguolei merged commit 2871c53 into apache:branch-4.1Aug 28, 2026
29 of 32 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@seawinde@hello-stephen@yiguolei