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

core: use previous size if heartbeat's size is zero #4243

Merged
merged 3 commits into from
Nov 1, 2021

Conversation

w41ter
Copy link
Contributor

@w41ter w41ter commented Oct 28, 2021

ref tikv/tikv#11114

Signed-off-by: p4tr1ck patrick.li@pingcap.com

What problem does this PR solve?

Part of tikv/tikv#11114

close #4258

What is changed and how it works?

If region size is zero, try to use the previous size in origin region info.

Check List

Tests

  • Unit test

Code changes

none

Side effects

  • Increased code complexity
  • Breaking backward compatibility

Related changes

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 28, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lhy1024
  • rleungx

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 added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/invalid-commit-message labels Oct 28, 2021
@rleungx
Copy link
Member

rleungx commented Oct 28, 2021

@PatrickNicholas CI failed.

@w41ter
Copy link
Contributor Author

w41ter commented Oct 28, 2021

@PatrickNicholas CI failed.

fixed, PTAL

@w41ter
Copy link
Contributor Author

w41ter commented Oct 29, 2021

/cc @lhy1024 @HunDunDM PTAL

@ti-chi-bot
Copy link
Member

@PatrickNicholas: GitHub didn't allow me to request PR reviews from the following users: PTAL.

Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @lhy1024 @HunDunDM PTAL

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 kubernetes/test-infra repository.

@codecov
Copy link

codecov bot commented Oct 29, 2021

Codecov Report

Merging #4243 (25da46d) into master (788f352) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4243      +/-   ##
==========================================
+ Coverage   74.80%   74.87%   +0.06%     
==========================================
  Files         264      264              
  Lines       27246    27253       +7     
==========================================
+ Hits        20382    20405      +23     
+ Misses       5043     5036       -7     
+ Partials     1821     1812       -9     
Flag Coverage Δ
unittests 74.87% <100.00%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
server/cluster/cluster.go 82.53% <100.00%> (+0.02%) ⬆️
server/core/region.go 91.81% <100.00%> (+0.09%) ⬆️
pkg/errs/errs.go 75.00% <0.00%> (-25.00%) ⬇️
pkg/tempurl/tempurl.go 45.00% <0.00%> (-15.00%) ⬇️
server/schedule/operator_controller.go 82.68% <0.00%> (-1.23%) ⬇️
server/tso/allocator_manager.go 65.50% <0.00%> (+0.33%) ⬆️
server/grpc_service.go 50.40% <0.00%> (+0.50%) ⬆️
server/member/member.go 66.84% <0.00%> (+0.53%) ⬆️
server/tso/tso.go 63.63% <0.00%> (+0.56%) ⬆️
server/config/persist_options.go 92.42% <0.00%> (+0.75%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 788f352...25da46d. Read the comment docs.

@w41ter w41ter closed this Oct 29, 2021
@w41ter w41ter force-pushed the support_zero_region_size branch from 6874ff9 to 433d4f2 Compare October 29, 2021 06:09
@w41ter w41ter reopened this Oct 29, 2021
Copy link
Contributor

@lhy1024 lhy1024 left a comment

Choose a reason for hiding this comment

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

This would be helpful in reducing redundant scheduling during reboots, but it would also make monitoring unintuitive.

@w41ter w41ter force-pushed the support_zero_region_size branch from e0827b0 to c451858 Compare October 29, 2021 06:32
@w41ter
Copy link
Contributor Author

w41ter commented Oct 29, 2021

but it would also make monitoring unintuitive

Do you mean the monitoring of region size is not intuitive enough? TiKV server will update the region size asynchronously and report it to PD. This process is within 10 minutes and is related to the cluster size, the unintuitiveness intervals should be acceptable?

@w41ter
Copy link
Contributor Author

w41ter commented Oct 29, 2021

/test

@w41ter w41ter force-pushed the support_zero_region_size branch from c451858 to 38260e4 Compare November 1, 2021 02:15
ref tikv/tikv#11114

Signed-off-by: p4tr1ck <patrick.li@pingcap.com>
@w41ter w41ter force-pushed the support_zero_region_size branch from 38260e4 to a9f3cb6 Compare November 1, 2021 02:22
Copy link
Member

@rleungx rleungx left a comment

Choose a reason for hiding this comment

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

LGTM, except for @lhy1024 's comment

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 1, 2021
@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 1, 2021
@rleungx
Copy link
Member

rleungx commented Nov 1, 2021

/merge

@ti-chi-bot
Copy link
Member

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

/run-all-tests

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.

@ti-chi-bot
Copy link
Member

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

Commit hash: a9f3cb6

@ti-chi-bot ti-chi-bot added status/can-merge Indicates a PR has been approved by a committer. and removed status/can-merge Indicates a PR has been approved by a committer. do-not-merge/invalid-commit-message labels Nov 1, 2021
Signed-off-by: p4tr1ck <patrick.li@pingcap.com>
@w41ter w41ter force-pushed the support_zero_region_size branch from c087ad1 to 8d69120 Compare November 1, 2021 06:13
@lhy1024
Copy link
Contributor

lhy1024 commented Nov 1, 2021

/merge

@ti-chi-bot
Copy link
Member

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

/run-all-tests

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.

@ti-chi-bot
Copy link
Member

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

Commit hash: 8d69120

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 1, 2021
@ti-chi-bot
Copy link
Member

@PatrickNicholas: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

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.

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.

@ti-chi-bot ti-chi-bot merged commit e096598 into tikv:master Nov 1, 2021
hzh0425 pushed a commit to hzh0425/pd that referenced this pull request Nov 16, 2021
* core: use previous size if heartbeat's size is zero

ref tikv/tikv#11114

Signed-off-by: p4tr1ck <patrick.li@pingcap.com>

* add issue link (tikv#4258)

Signed-off-by: p4tr1ck <patrick.li@pingcap.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: hzh0425 <642256541@qq.com>
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. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix meaningless scheduling caused by uninitialized region size
4 participants