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

Merged
merged 4 commits into from
Mar 23, 2021

Conversation

Yisaer
Copy link
Contributor

@Yisaer Yisaer commented Mar 23, 2021

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: yisaer <disxiaofei@163.com>
@Yisaer Yisaer removed the request for review from nolouch March 23, 2021 05:21
@Yisaer Yisaer added needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. needs-cherry-pick-release-5.0 The PR needs to cherry pick to release-5.0 branch. labels Mar 23, 2021
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 23, 2021
@codecov
Copy link

codecov bot commented Mar 23, 2021

Codecov Report

Merging #3506 (8c76c0c) into master (0dcc7ca) will decrease coverage by 0.02%.
The diff coverage is 64.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3506      +/-   ##
==========================================
- Coverage   74.58%   74.55%   -0.03%     
==========================================
  Files         244      245       +1     
  Lines       24054    24068      +14     
==========================================
+ Hits        17940    17945       +5     
- Misses       4503     4509       +6     
- Partials     1611     1614       +3     
Flag Coverage Δ
unittests 74.55% <64.28%> (-0.03%) ⬇️

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

Impacted Files Coverage Δ
server/core/region_option.go 81.39% <0.00%> (-1.94%) ⬇️
pkg/movingaverage/queue.go 75.00% <75.00%> (ø)
pkg/dashboard/adapter/manager.go 82.97% <0.00%> (-7.45%) ⬇️
server/tso/global_allocator.go 70.80% <0.00%> (-6.57%) ⬇️
server/schedule/operator/step.go 67.44% <0.00%> (-1.67%) ⬇️
server/cluster/cluster.go 82.92% <0.00%> (-0.85%) ⬇️
server/core/storage.go 67.68% <0.00%> (-0.77%) ⬇️
server/tso/allocator_manager.go 75.24% <0.00%> (-0.34%) ⬇️
server/server.go 71.98% <0.00%> (ø)
... and 9 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 0dcc7ca...8c76c0c. Read the comment docs.

@Yisaer Yisaer force-pushed the fix_queue branch 4 times, most recently from a62649a to 76eb425 Compare March 23, 2021 08:18
Signed-off-by: yisaer <disxiaofei@163.com>
@ti-chi-bot
Copy link
Member

[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 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 23, 2021
@Yisaer
Copy link
Contributor Author

Yisaer commented Mar 23, 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: 56fefee

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 23, 2021
@ti-chi-bot ti-chi-bot merged commit 610c05b into tikv:master Mar 23, 2021
ti-srebot pushed a commit to ti-srebot/pd that referenced this pull request Mar 23, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #3509

ti-srebot pushed a commit to ti-srebot/pd that referenced this pull request Mar 23, 2021
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-5.0 in PR #3510

ti-chi-bot added a commit that referenced this pull request Mar 24, 2021
…3510)

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

Co-authored-by: Song Gao <disxiaofei@163.com>
Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
Yisaer added a commit that referenced this pull request Mar 25, 2021
…3509)

* cherry pick #3506 to release-4.0

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

* fix conflict

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

* use init

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

Co-authored-by: Song Gao <disxiaofei@163.com>
Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. needs-cherry-pick-release-5.0 The PR needs to cherry pick to release-5.0 branch. 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.

5 participants