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

tools: support changing the percentage of heartbeat #7698

Merged
merged 4 commits into from
Jan 12, 2024

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jan 11, 2024

What problem does this PR solve?

Issue Number: Ref #7703.

What is changed and how does it work?

Check List

Tests

  • Manual test

stage1: use default leader-update-ratio 0.06
stage2: increase leader-update-ratio to 0.12, the report number is doubled and update cache also doubled.
stage3: change no-update-ratio from 0 to 0.12, only the report number is doubled.

Screenshot 2024-01-11 at 16 33 18 Screenshot 2024-01-11 at 16 33 23

Release note

None.

Signed-off-by: Ryan Leung <rleungx@gmail.com>
Copy link
Contributor

ti-chi-bot bot commented Jan 11, 2024

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • CabinfeverB

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jan 11, 2024
@rleungx rleungx requested a review from CabinfeverB January 11, 2024 08:40
@ti-chi-bot ti-chi-bot bot requested review from disksing and HunDunDM January 11, 2024 08:40
@ti-chi-bot ti-chi-bot bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 11, 2024
Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Merging #7698 (9b1002d) into master (2a2a615) will decrease coverage by 0.03%.
Report is 2 commits behind head on master.
The diff coverage is 94.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7698      +/-   ##
==========================================
- Coverage   73.80%   73.78%   -0.03%     
==========================================
  Files         429      429              
  Lines       47439    47413      -26     
==========================================
- Hits        35014    34983      -31     
- Misses       9424     9451      +27     
+ Partials     3001     2979      -22     
Flag Coverage Δ
unittests 73.78% <94.59%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@rleungx rleungx added the require-LGT1 Indicates that the PR requires an LGTM. label Jan 12, 2024
Copy link
Member

@CabinfeverB CabinfeverB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REST LGTM

})
NoUpdatedRegionsNum := int(float64(cfg.RegionCount) * ratio)
res := make([]int, 0, NoUpdatedRegionsNum)
i := 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
i := 0
for i := 0; len(res) < NoUpdatedRegionsNum; i++ {
if _, ok := updatedMap[slice[i]]; !ok {
res = append(res, slice[i])
}
}

rand.Shuffle(cfg.RegionCount, func(i, j int) {
slice[i], slice[j] = slice[j], slice[i]
})
NoUpdatedRegionsNum := int(float64(cfg.RegionCount) * ratio)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And do we need check the NoUpdatedRegionsNum + len(updatedMap) should less than len(slice)

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 12, 2024
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 12, 2024
@rleungx
Copy link
Member Author

rleungx commented Jan 12, 2024

/merge

Copy link
Contributor

ti-chi-bot bot commented Jan 12, 2024

@rleungx: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Copy link
Contributor

ti-chi-bot bot commented Jan 12, 2024

This pull request has been accepted and is ready to merge.

Commit hash: c17150f

@ti-chi-bot ti-chi-bot bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 12, 2024
@ti-chi-bot ti-chi-bot bot merged commit 1514418 into tikv:master Jan 12, 2024
22 checks passed
@rleungx rleungx deleted the hibernate branch January 12, 2024 07:29
pingandb pushed a commit to pingandb/pd that referenced this pull request Jan 18, 2024
ref tikv#7703

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Signed-off-by: pingandb <songge102@pingan.com.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none Denotes a PR that doesn't merit a release note. require-LGT1 Indicates that the PR requires an LGTM. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants