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] Rebuild materialized index meta after schema change #31577

Conversation

LiShuMing
Copy link
Contributor

@LiShuMing LiShuMing commented Sep 21, 2023

Fixes #issue

  • Schema change will build a new MaterializedIndexMeta, we need rebuild it(add extra original meta) into it from original index meta. Otherwise, some necessary metas will be lost after fe restart.

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

Bugfix cherry-pick branch check:

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

@sonarcloud
Copy link

sonarcloud bot commented Sep 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

0.0% 0.0% Coverage
1.7% 1.7% Duplication

@wanpengfei-git
Copy link
Collaborator

[FE Incremental Coverage Report]

😞 fail : 22 / 43 (51.16%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/sql/InsertPlanner.java 1 17 05.88% [522, 524, 525, 526, 527, 528, 530, 531, 532, 533, 535, 536, 537, 538, 539, 541]
🔵 com/starrocks/alter/AlterJobV2.java 5 10 50.00% [334, 335, 336, 337, 338]
🔵 com/starrocks/catalog/MaterializedIndexMeta.java 3 3 100.00% []
🔵 com/starrocks/alter/LakeTableSchemaChangeJob.java 6 6 100.00% []
🔵 com/starrocks/alter/SchemaChangeJobV2.java 7 7 100.00% []

@wanpengfei-git
Copy link
Collaborator

[BE Incremental Coverage Report]

😍 pass : 0 / 0 (0%)

@kangkaisen kangkaisen merged commit 66eace9 into StarRocks:main Oct 8, 2023
69 of 75 checks passed
@wanpengfei-git
Copy link
Collaborator

@Mergifyio backport branch-3.2

@github-actions github-actions bot removed the 3.2 label Oct 8, 2023
@wanpengfei-git
Copy link
Collaborator

@Mergifyio backport branch-3.1

@github-actions github-actions bot removed the 3.1 label Oct 8, 2023
@wanpengfei-git
Copy link
Collaborator

@Mergifyio backport branch-3.0

@mergify
Copy link
Contributor

mergify bot commented Oct 8, 2023

backport branch-3.2

✅ Backports have been created

@mergify
Copy link
Contributor

mergify bot commented Oct 8, 2023

backport branch-3.1

✅ Backports have been created

@github-actions github-actions bot removed the 3.0 label Oct 8, 2023
@mergify
Copy link
Contributor

mergify bot commented Oct 8, 2023

backport branch-3.0

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 8, 2023
mergify bot pushed a commit that referenced this pull request Oct 8, 2023
mergify bot pushed a commit that referenced this pull request Oct 8, 2023
Signed-off-by: shuming.li <[email protected]>
(cherry picked from commit 66eace9)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/alter/LakeTableSchemaChangeJob.java
#	fe/fe-core/src/main/java/com/starrocks/catalog/MaterializedIndexMeta.java
#	fe/fe-core/src/main/java/com/starrocks/sql/InsertPlanner.java
LiShuMing added a commit to LiShuMing/starrocks that referenced this pull request Oct 27, 2023
LiShuMing added a commit to LiShuMing/starrocks that referenced this pull request Oct 27, 2023
LiShuMing added a commit to LiShuMing/starrocks that referenced this pull request Oct 27, 2023
LiShuMing added a commit to LiShuMing/starrocks that referenced this pull request Nov 14, 2023
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.

6 participants