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

movingaverage: support concurrency safe queue in AvgOverTime (#3506) #3509

Merged
merged 6 commits into from
Mar 25, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented Mar 23, 2021

cherry-pick #3506 to release-4.0
You can switch your code base to this Pull Request by using git-extras:

# In pd repo:
git pr https://github.com/tikv/pd/pull/3509

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/pd.git pr/3509:release-4.0-610c05b7e1c4

Signed-off-by: yisaer disxiaofei@163.com

What is changed and how it works?

support concurrency safe queue in AvgOverTime

Check list

Benchmark Test with concurrency queue

$ go test -bench=BenchmarkCheckRegionFlow -benchtime=10s                                                     
OK: 11 passed
goos: darwin
goarch: amd64
pkg: github.com/tikv/pd/server/statistics
BenchmarkCheckRegionFlow-4       5084605              1996 ns/op
PASS
ok      github.com/tikv/pd/server/statistics    13.584s

Benchmark Test with origin queue

$ go test -bench=BenchmarkCheckRegionFlow -benchtime=10s
OK: 11 passed
goos: darwin
goarch: amd64
pkg: github.com/tikv/pd/server/statistics
BenchmarkCheckRegionFlow-4       6700020              1814 ns/op
PASS
ok      github.com/tikv/pd/server/statistics    15.019s

Release note

  • No release note

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

@Yisaer you're already a collaborator in bot's repo.

@Yisaer
Copy link
Contributor

Yisaer commented Mar 24, 2021

/merge

@ti-chi-bot
Copy link
Member

@Yisaer: 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: 73b6edd

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 24, 2021
@Yisaer Yisaer closed this Mar 24, 2021
@Yisaer Yisaer reopened this Mar 24, 2021
@Yisaer Yisaer added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 24, 2021
@nolouch
Copy link
Contributor

nolouch commented Mar 25, 2021

@Yisaer please solve the conflict.

@HunDunDM HunDunDM added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Mar 25, 2021
@HunDunDM
Copy link
Member

/lgtm cancel

@ti-chi-bot ti-chi-bot removed the status/LGT2 Indicates that a PR has LGTM 2. label Mar 25, 2021
Yisaer and others added 2 commits March 25, 2021 18:25
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Mar 25, 2021
@codecov
Copy link

codecov bot commented Mar 25, 2021

Codecov Report

Merging #3509 (f4ccce5) into release-4.0 (85a49d5) will decrease coverage by 1.94%.
The diff coverage is 68.39%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-4.0    #3509      +/-   ##
===============================================
- Coverage        77.16%   75.22%   -1.95%     
===============================================
  Files              204      210       +6     
  Lines            21940    19826    -2114     
===============================================
- Hits             16931    14914    -2017     
+ Misses            3724     3576     -148     
- Partials          1285     1336      +51     
Flag Coverage Δ
unittests 75.22% <68.39%> (?)

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

Impacted Files Coverage Δ
client/metrics.go 100.00% <ø> (ø)
pkg/apiutil/apiutil.go 61.90% <ø> (-5.45%) ⬇️
pkg/cache/cache.go 0.00% <ø> (ø)
pkg/cache/fifo.go 100.00% <ø> (ø)
pkg/cache/lru.go 76.74% <ø> (-3.62%) ⬇️
pkg/cache/two_queue.go 61.11% <ø> (-5.56%) ⬇️
pkg/codec/codec.go 77.46% <ø> (-1.11%) ⬇️
pkg/component/manager.go 77.94% <ø> (-3.08%) ⬇️
pkg/dashboard/adapter/redirector.go 93.33% <ø> (-0.90%) ⬇️
pkg/dashboard/keyvisual/input/core.go 33.33% <ø> (ø)
... and 372 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 cd3b13e...f4ccce5. Read the comment docs.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 25, 2021
@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Yisaer
  • lhy1024

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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@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 Mar 25, 2021
@Yisaer
Copy link
Contributor

Yisaer commented Mar 25, 2021

/merge

@ti-chi-bot
Copy link
Member

@Yisaer: 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: 65a7540

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 25, 2021
@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label Mar 25, 2021
@zhouqiang-cl
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@zhouqiang-cl: 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.

@HunDunDM
Copy link
Member

/rebuild

@Yisaer
Copy link
Contributor

Yisaer commented Mar 25, 2021

/run-all-test

@Yisaer
Copy link
Contributor

Yisaer commented Mar 25, 2021

/merge

@ti-chi-bot
Copy link
Member

@Yisaer: 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.

@HunDunDM
Copy link
Member

/rebuild

@zhouqiang-cl
Copy link
Contributor

/merge

@ti-chi-bot
Copy link
Member

@zhouqiang-cl: 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.

Signed-off-by: yisaer <disxiaofei@163.com>
@ti-chi-bot ti-chi-bot removed the status/can-merge Indicates a PR has been approved by a committer. label Mar 25, 2021
@sonarcloud
Copy link

sonarcloud bot commented Mar 25, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 14 Code Smells

No Coverage information No Coverage information
2.9% 2.9% Duplication

@Yisaer
Copy link
Contributor

Yisaer commented Mar 25, 2021

/merge

@ti-chi-bot
Copy link
Member

@Yisaer: 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: f4ccce5

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 25, 2021
@Yisaer Yisaer merged commit 05b9d6d into tikv:release-4.0 Mar 25, 2021
@Yisaer Yisaer deleted the release-4.0-610c05b7e1c4 branch March 25, 2021 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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.

7 participants