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 the bug of incorrect updates in the vacuum version. (backport #56273) #56331

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 27, 2025

Why I'm doing:

We add vacuum version into partition to decide one partition need vacuum or not. And only the partition which minRetainVersion is greater than lastSuccessVersion will trigger vacuum. So the lastSuccessVersion will be set to the minimum vacuum success version for all tablets.

However, there exist the following special case:

  1. one tablet has 3 metadata which version is 8, 9, 10 and their prev_garbage_version values are all 6.
  2. the version 10 is generated by compaction so there exist some garbage files could be deleted.
  3. FE send vacuum request to this tablet but all metadata files are created after the grace timestamp, so we won't delete any files [1]
  4. the vacuum_version of this tablet will be set to 10 because the min_retain_version is 10. [1]
  5. FE will update lastSuccessVersion to 10 and the compaction input files of version 10 will not be deleted if the tablet is not change anymore.

What I'm doing:

We should set tablet vacuum version to the earliest pre_garbage_version if we don't delete any files.

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

@mergify mergify bot added the conflicts label Feb 27, 2025
Copy link
Contributor Author

mergify bot commented Feb 27, 2025

Cherry-pick of 421d656 has failed:

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

You are currently cherry-picking commit 421d656137.
  (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)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   be/src/storage/lake/vacuum.cpp
	both modified:   be/test/storage/lake/vacuum_test.cpp

no changes added to commit (use "git add" and/or "git commit -a")

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

@wanpengfei-git wanpengfei-git enabled auto-merge (squash) February 27, 2025 02:23
@mergify mergify bot closed this Feb 27, 2025
auto-merge was automatically disabled February 27, 2025 02:23

Pull request was closed

Copy link
Contributor Author

mergify bot commented Feb 27, 2025

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

@sevev sevev reopened this Feb 28, 2025
@wanpengfei-git wanpengfei-git enabled auto-merge (squash) February 28, 2025 03:07
Signed-off-by: sevev <[email protected]>
@sevev sevev force-pushed the mergify/bp/branch-3.3/pr-56273 branch from 38c2aca to 2b5eb8c Compare February 28, 2025 03:15
@wanpengfei-git wanpengfei-git merged commit cee008a into branch-3.3 Feb 28, 2025
26 checks passed
@wanpengfei-git wanpengfei-git deleted the mergify/bp/branch-3.3/pr-56273 branch February 28, 2025 04:32
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.

2 participants