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] Fix check sync materialized view exist bug #30038

Merged

Conversation

LiShuMing
Copy link
Contributor

@LiShuMing LiShuMing commented Aug 28, 2023

  1. If ((OlapTable) tbl).getIndexNameById(mvMeta.getIndexId()) is null (there maybe some corrupt in the table), create sync mv will always fail
if (((OlapTable) tbl).getIndexNameById(mvMeta.getIndexId()).equals(addMVClause.getMVName()))
  1. add more information to help user to check.

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.1
    • 3.0
    • 2.5
    • 2.4

@LiShuMing LiShuMing force-pushed the fix/main/sync_mv_check_name_exists branch from 81c4cf2 to 382dba9 Compare August 28, 2023 11:20
Signed-off-by: shuming.li <ming.moriarty@gmail.com>
Signed-off-by: shuming.li <ming.moriarty@gmail.com>
@LiShuMing LiShuMing force-pushed the fix/main/sync_mv_check_name_exists branch from 382dba9 to 1a1d380 Compare August 29, 2023 02:09
@sonarcloud
Copy link

sonarcloud bot commented Aug 29, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug D 3 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@wanpengfei-git
Copy link
Collaborator

[FE Incremental Coverage Report]

😍 pass : 12 / 12 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/alter/MaterializedViewHandler.java 12 12 100.00% []

@wanpengfei-git
Copy link
Collaborator

[BE Incremental Coverage Report]

😍 pass : 0 / 0 (0%)

@kangkaisen kangkaisen merged commit d299ddd into StarRocks:main Aug 29, 2023
27 of 30 checks passed
@wanpengfei-git
Copy link
Collaborator

@Mergifyio backport branch-3.1

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

@Mergifyio backport branch-3.0

@github-actions github-actions bot removed the 3.0 label Aug 29, 2023
@mergify
Copy link
Contributor

mergify bot commented Aug 29, 2023

backport branch-3.1

✅ Backports have been created

@mergify
Copy link
Contributor

mergify bot commented Aug 29, 2023

backport branch-3.0

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Aug 29, 2023
* Fix check sync materialized view exist bug

Signed-off-by: shuming.li <ming.moriarty@gmail.com>

* fix bugs

Signed-off-by: shuming.li <ming.moriarty@gmail.com>

---------

Signed-off-by: shuming.li <ming.moriarty@gmail.com>
(cherry picked from commit d299ddd)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/alter/MaterializedViewHandler.java
mergify bot pushed a commit that referenced this pull request Aug 29, 2023
* Fix check sync materialized view exist bug

Signed-off-by: shuming.li <ming.moriarty@gmail.com>

* fix bugs

Signed-off-by: shuming.li <ming.moriarty@gmail.com>

---------

Signed-off-by: shuming.li <ming.moriarty@gmail.com>
(cherry picked from commit d299ddd)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/alter/MaterializedViewHandler.java
#	fe/fe-core/src/test/java/com/starrocks/analysis/CreateMaterializedViewTest.java
Jay-ju pushed a commit to Jay-ju/starrocks that referenced this pull request Sep 7, 2023
* Fix check sync materialized view exist bug

Signed-off-by: shuming.li <ming.moriarty@gmail.com>

* fix bugs

Signed-off-by: shuming.li <ming.moriarty@gmail.com>

---------

Signed-off-by: shuming.li <ming.moriarty@gmail.com>
Sign up for free to 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.

None yet

4 participants