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

[Enhancement] limit persistent index compaction by disk (backport #36681) #37693

Merged
merged 4 commits into from
Dec 25, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 25, 2023

This is an automatic backport of pull request #36681 done by Mergify.
Cherry-pick of a44147f has failed:

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

You are currently cherry-picking commit a44147f1f8.
  (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:   be/src/common/config.h
	modified:   be/src/http/action/update_config_action.cpp
	modified:   be/src/storage/olap_server.cpp
	modified:   be/src/storage/persistent_index.cpp
	modified:   be/src/storage/persistent_index_compaction_manager.h
	modified:   be/test/storage/persistent_index_test.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   be/src/storage/persistent_index.h
	both modified:   be/src/storage/persistent_index_compaction_manager.cpp

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


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

Why I'm doing: In current implementation, we doesn't control the compaction concurrency on one disk, which will cause compaction unbalanced between disks, and some disk's IO cost will be too high.

What I'm doing:

  1. Limit the disk compaction concurrency by config pindex_major_compaction_limit_per_disk .
  2. Refactor persistent index compaction scheduler code.

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

Why I'm doing:
In current implementation, we doesn't control the compaction concurrency on one disk, which will cause compaction unbalanced between disks, and some disk's IO cost will be too high.

What I'm doing:

Limit the disk compaction concurrency by config pindex_major_compaction_limit_per_disk .
Refactor persistent index compaction scheduler code.

Signed-off-by: luohaha <[email protected]>
(cherry picked from commit a44147f)

# Conflicts:
#	be/src/storage/persistent_index.h
#	be/src/storage/persistent_index_compaction_manager.cpp
Copy link
Contributor Author

mergify bot commented Dec 25, 2023

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

@mergify mergify bot closed this Dec 25, 2023
@mergify mergify bot deleted the mergify/bp/branch-3.2/pr-36681 branch December 25, 2023 03:43
@luohaha luohaha restored the mergify/bp/branch-3.2/pr-36681 branch December 25, 2023 17:47
@luohaha luohaha reopened this Dec 25, 2023
luohaha
luohaha previously approved these changes Dec 25, 2023
@luohaha luohaha enabled auto-merge (squash) December 25, 2023 18:07
Signed-off-by: Yixin Luo <[email protected]>
@luohaha luohaha merged commit 954bceb into branch-3.2 Dec 25, 2023
20 of 22 checks passed
@luohaha luohaha deleted the mergify/bp/branch-3.2/pr-36681 branch December 25, 2023 21:56
Copy link

[FE Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[BE Incremental Coverage Report]

fail : 1 / 27 (03.70%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 src/storage/olap_server.cpp 0 2 00.00% [402, 403]
🔵 src/http/action/update_config_action.cpp 0 1 00.00% [116]
🔵 src/storage/persistent_index_compaction_manager.cpp 1 24 04.17% [52, 61, 63, 64, 66, 67, 68, 69, 70, 71, 75, 79, 84, 85, 86, 89, 90, 91, 94, 100, 101, 104, 106]

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.

1 participant