StarRocks / starrocks

The world's fastest open query engine for sub-second analytics both on and off the data lakehouse. With the flexibility to support nearly any scenario, StarRocks provides best-in-class performance for multi-dimensional analytics, real-time analytics, and ad-hoc queries. A Linux Foundation project.
https://starrocks.io
Apache License 2.0
9.03k stars 1.82k forks source link

[BugFix] Only repair mv when table's version/version time are matched with mv's version map (backport #49240) #53051

Closed mergify[bot] closed 2 days ago

mergify[bot] commented 2 days ago

Why I'm doing:

  1. 48883 will repair mv's partition version no matter the base table's partition has already refreshed which will cause

    wrong version mapping between mv and base table.

  2. Stream Load will not trigger related mv since changed.

What I'm doing:

Fixes #issue

What type of PR is this:

Does this PR entail a change in behavior?

If yes, please specify the type of change:

Checklist:

Bugfix cherry-pick branch check:

  1. 48883 will repair mv's partition version no matter the base table's partition has already refreshed which will cause

    wrong version mapping between mv and base table.

  2. Stream Load will not trigger related mv since changed.

What I'm doing:

Fixes #issue

What type of PR is this:

Does this PR entail a change in behavior?

If yes, please specify the type of change:

Checklist:

mergify[bot] commented 2 days ago

Cherry-pick of dca57fc0ed87780870046f6986a90673f02adeb7 has failed:

On branch mergify/bp/branch-3.2/pr-49240
Your branch is up to date with 'origin/branch-3.2'.

You are currently cherry-picking commit dca57fc0ed.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
    modified:   fe/fe-core/src/main/java/com/starrocks/listener/LoadJobMVListener.java
    modified:   fe/fe-core/src/main/java/com/starrocks/mv/MVMetaVersionRepairer.java
    modified:   fe/fe-core/src/test/java/com/starrocks/planner/mv/MVMetaVersionRepairerTest.java
    modified:   fe/fe-core/src/test/java/com/starrocks/server/MVRepairHandlerTest.java
    new file:   test/sql/test_materialized_view_refresh/R/test_mv_event_trigger_with_stream_load
    new file:   test/sql/test_materialized_view_refresh/T/test_mv_event_trigger_with_stream_load

Unmerged paths:
  (use "git add <file>..." to mark resolution)
    both modified:   fe/fe-core/src/main/java/com/starrocks/alter/LakeTableAlterMetaJobBase.java
    both modified:   fe/fe-core/src/main/java/com/starrocks/mv/MVRepairHandler.java

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify[bot] commented 2 days ago

@mergify[bot]: Backport conflict, please reslove the conflict and resubmit the pr

sonarcloud[bot] commented 2 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud