Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] Only inactive related materialized views because of base table/view is changed in Leader and not replay #54732

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LiShuMing
Copy link
Contributor

@LiShuMing LiShuMing commented Jan 6, 2025

Why I'm doing:

  • Only inactive related mvs because of base table changes in leader and not replay to avoid duplicate inactive.

eg:

t1:  view has schema changed and mv is set inactive!
t2: change mv to active by hand
t3: FE restart and replay t1's edit log, will inactive mv again!!! which is not expecte!

What I'm doing:

  • Only inactive related materialized views because of base table/view is changed in Leader and not replay
  • Add enable_mv_automatic_inactive_by_base_table_changes to avoid automatic inactibe by base table's changes, default true.

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.4
    • 3.3
    • 3.2
    • 3.1
    • 3.0

@LiShuMing LiShuMing requested a review from a team as a code owner January 6, 2025 07:49
@LiShuMing LiShuMing force-pushed the fix_mv_inactive_reason branch from 6eeb240 to 3c5d472 Compare January 6, 2025 07:49
@LiShuMing LiShuMing requested a review from a team as a code owner January 6, 2025 07:49
@wanpengfei-git wanpengfei-git requested a review from a team January 6, 2025 07:50
@LiShuMing LiShuMing force-pushed the fix_mv_inactive_reason branch from 3c5d472 to f8cfcd0 Compare January 6, 2025 08:00
@LiShuMing LiShuMing requested review from a team as code owners January 6, 2025 09:12
…s changed in Leader and not replay

Signed-off-by: shuming.li <[email protected]>
Signed-off-by: shuming.li <[email protected]>
@LiShuMing LiShuMing force-pushed the fix_mv_inactive_reason branch from 0bb5fac to 3ede42a Compare January 7, 2025 08:09
Copy link

github-actions bot commented Jan 7, 2025

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

github-actions bot commented Jan 7, 2025

[FE Incremental Coverage Report]

pass : 85 / 105 (80.95%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/persist/EditLog.java 0 1 00.00% [348]
🔵 com/starrocks/alter/AlterMVJobExecutor.java 64 83 77.11% [472, 499, 500, 501, 548, 549, 550, 569, 594, 595, 597, 598, 599, 600, 601, 602, 603, 604, 606]
🔵 com/starrocks/catalog/OlapTable.java 2 2 100.00% []
🔵 com/starrocks/common/Config.java 1 1 100.00% []
🔵 com/starrocks/server/LocalMetastore.java 2 2 100.00% []
🔵 com/starrocks/alter/LakeTableAsyncFastSchemaChangeJob.java 1 1 100.00% []
🔵 com/starrocks/alter/AlterJobExecutor.java 5 5 100.00% []
🔵 com/starrocks/alter/SchemaChangeHandler.java 1 1 100.00% []
🔵 com/starrocks/alter/AlterJobMgr.java 5 5 100.00% []
🔵 com/starrocks/persist/AlterMaterializedViewStatusLog.java 3 3 100.00% []
🔵 com/starrocks/alter/SchemaChangeJobV2.java 1 1 100.00% []

Copy link

github-actions bot commented Jan 7, 2025

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants