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] Optimize the root path choosing logic on tablet creation (backport #26238) #26382

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 3, 2023

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

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

You are currently cherry-picking commit dbf5fc61e.
  (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/storage/data_dir.cpp
	modified:   be/src/storage/data_dir.h
	modified:   be/src/storage/storage_engine.cpp
	modified:   be/src/storage/storage_engine.h

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   be/src/common/config.h

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

#26238)

Fixes SR-18615

Returned a vector contains all the storage root paths and the vector
is sorted by the disk usage in asc order, then the front portion of the
vector excluding paths which have high disk usage is shuffled to avoid
the newly created tablet is distributed on only on specific path.

This is an enhancement to pr #20833, in the original logic, vector is
sorted
by available capacity in desc order and then shuffle half of the vector,
this
has two problems:
1. different disk may have different total capacity, we should sort the
path
    based on usage not the available bytes.
2. if the disk usage of the root paths is similar, this will cause half
of disks have
    have unbalanced number of tablet.

Signed-off-by: Dejun Xia <[email protected]>
(cherry picked from commit dbf5fc6)

# Conflicts:
#	be/src/common/config.h
@mergify mergify bot added the conflicts label Jul 3, 2023
@wanpengfei-git wanpengfei-git enabled auto-merge (rebase) July 3, 2023 04:06
@mergify mergify bot closed this Jul 3, 2023
auto-merge was automatically disabled July 3, 2023 04:06

Pull request was closed

@mergify
Copy link
Contributor Author

mergify bot commented Jul 3, 2023

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

@mergify mergify bot deleted the mergify/bp/branch-2.5/pr-26238 branch July 3, 2023 04:07
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