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

simulator: make heartbeat more reasonable #1418

Merged
merged 5 commits into from Mar 7, 2019

Conversation

Projects
None yet
4 participants
@rleungx
Copy link
Member

rleungx commented Jan 24, 2019

What problem does this PR solve?

Currently, if one store is going to send the heartbeat, it needs to wait until the previous one finishes it.

What is changed and how it works?

This PR tries to use different goroutines to do these jobs.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

@rleungx rleungx requested review from nolouch and disksing Jan 24, 2019

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 25, 2019

Codecov Report

Merging #1418 into master will decrease coverage by 0.47%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1418      +/-   ##
==========================================
- Coverage   68.01%   67.53%   -0.48%     
==========================================
  Files         158      158              
  Lines       15208    15261      +53     
==========================================
- Hits        10344    10307      -37     
- Misses       3950     4025      +75     
- Partials      914      929      +15
Impacted Files Coverage Δ
tools/pd-simulator/simulator/drive.go 0% <0%> (ø) ⬆️
tools/pd-simulator/simulator/raft.go 14.82% <0%> (-0.71%) ⬇️
tools/pd-simulator/simulator/task.go 0% <0%> (ø) ⬆️
tools/pd-simulator/simulator/statistics.go 0% <0%> (ø) ⬆️
tools/pd-simulator/simulator/node.go 0% <0%> (ø) ⬆️
pkg/tempurl/tempurl.go 57.14% <0%> (-14.29%) ⬇️
server/etcd_kv.go 63.63% <0%> (-10.91%) ⬇️
server/leader.go 80.25% <0%> (-7.15%) ⬇️
server/namespace_cluster.go 84.41% <0%> (-3.9%) ⬇️
server/util.go 70.27% <0%> (-2.71%) ⬇️
... and 6 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 408348e...c674965. Read the comment docs.

Show resolved Hide resolved tools/pd-simulator/simulator/node.go Outdated
Show resolved Hide resolved tools/pd-simulator/simulator/node.go Outdated

rleungx added some commits Jan 4, 2019

make heartbeat more reasonable
Signed-off-by: rleungx <rleungx@gmail.com>
start heartbeat randomly
Signed-off-by: rleungx <rleungx@gmail.com>
address comments
Signed-off-by: rleungx <rleungx@gmail.com>

@rleungx rleungx force-pushed the rleungx:simulator-heartbeat branch from 7a4ad5f to 4ae77b1 Feb 19, 2019

@rleungx

This comment has been minimized.

Copy link
Member Author

rleungx commented Feb 20, 2019

/rebuild

rleungx added some commits Mar 5, 2019

@nolouch

nolouch approved these changes Mar 7, 2019

@nolouch nolouch merged commit 2fe8598 into pingcap:master Mar 7, 2019

4 of 6 checks passed

codecov/patch 0% of diff hit (target 68.01%)
Details
codecov/project 67.53% (-0.48%) compared to 408348e
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
idc-jenkins-ci/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.