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] Fixe bug where tablet was not deleted from meta when removing disk path from be.conf (backport 41755) #42217

Merged

Conversation

gengjun-git
Copy link
Contributor

Why I'm doing:

A disk is removed from be's conf. The normal repair logic is as follows:

  1. BE reports the full amount of tablets to FE. At this time, it will not bring along the tablets that have been removed from the disk.
  2. FE compares the tablets reported by BE with the tablets recorded in its own metadata, and deletes replicas of tablets that do not exist in BE from the metadata.
  3. Make up for the lost replicas based on the tablets on other BEs.

However, if there are too many tablets on a BE, the processing time of the second step is too long. As long as tablets are created or imported on the BE, which is controlled by reportVersion, the deletion will not be performed, resulting in incorrect metadata information being recorded on the FE side.

What I'm doing:

Only check reportVersion when the disk is online, as there will be no tablet changes on an unavailable disk.

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.2
    • 3.1
    • 3.0
    • 2.5

Signed-off-by: gengjun-git <[email protected]>
wanpengfei-git
wanpengfei-git previously approved these changes Mar 6, 2024
@gengjun-git gengjun-git enabled auto-merge (squash) March 6, 2024 09:41
Signed-off-by: gengjun-git <[email protected]>
@gengjun-git gengjun-git merged commit 0b80015 into StarRocks:branch-2.2-walmart Mar 6, 2024
16 of 17 checks passed
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.

3 participants