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

*: rename and add tidb_wait_split_region_finish_backoff session var to set wait split region backoff time. #10797

Merged
merged 17 commits into from
Jun 20, 2019

Conversation

crazycs520
Copy link
Contributor

@crazycs520 crazycs520 commented Jun 13, 2019

What problem does this PR solve?

  • rename functions and variables.
  • add a session variable tidb_wait_split_region_finish_backoff to set the split region back off time.
  • change tidb_wait_split_region_finish default value to true. We meet some performence problem cause by default async scatter behaviour . So we decide change this default behaviour to sync scatter.

What is changed and how it works?

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

Related changes

  • Need to cherry-pick to the release branch

@codecov
Copy link

codecov bot commented Jun 14, 2019

Codecov Report

Merging #10797 into master will increase coverage by 0.0417%.
The diff coverage is 81.8181%.

@@               Coverage Diff                @@
##             master     #10797        +/-   ##
================================================
+ Coverage   80.9047%   80.9465%   +0.0417%     
================================================
  Files           419        419                
  Lines         88750      88787        +37     
================================================
+ Hits          71803      71870        +67     
+ Misses        11714      11680        -34     
- Partials       5233       5237         +4

Copy link
Contributor

@winkyao winkyao left a comment

Choose a reason for hiding this comment

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

LGTM

@winkyao winkyao added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 14, 2019
Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

case TiDBWaitSplitRegionFinish:
s.WaitSplitRegionFinish = TiDBOptOn(val)
case TiDBWaitSplitRegionFinishBackoff:
s.Backoff.SetWaitScatterRegionFinishBackoff(int(tidbOptInt64(val, backoff.WaitScatterRegionFinishBackoff)))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we add function like tidbOptPositiveInt32 is enough. Then we remove backoff_time.go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.


// GetWaitScatterRegionFinishBackoff gets the back off time of waitScatterRegionFinish.
func (b *BackoffTimer) GetWaitScatterRegionFinishBackoff() int {
if b.waitScatterRegionFinish > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

If we use tidbOptPositiveInt32 to set the value. I think we needn't do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. Thanks.

@crazycs520
Copy link
Contributor Author

/run-all-tests

zimulala
zimulala previously approved these changes Jun 19, 2019
Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

LGTM

@zimulala zimulala added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 19, 2019
@crazycs520
Copy link
Contributor Author

/run-all-tests

@crazycs520
Copy link
Contributor Author

/run-all-tests

@crazycs520
Copy link
Contributor Author

/run-all-tests

@crazycs520
Copy link
Contributor Author

/run-all-tests

@crazycs520
Copy link
Contributor Author

/run-unit-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2. type/usability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants