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

raft: prevent learners from becoming leader #10822

Merged
merged 1 commit into from
Jun 17, 2019

Conversation

tbg
Copy link
Contributor

@tbg tbg commented Jun 17, 2019

We were already taking some precautions against learners campaigning,
but there was no safeguard against an explicit call to Campaign().
The newly added test also verifies that leadership transfers to
learners are ignored.

We were already taking some precautions against learners campaigning,
but there was no safeguard against an explicit call to `Campaign()`.
The newly added test also verifies that leadership transfers to
learners are ignored.
@codecov-io
Copy link

Codecov Report

Merging #10822 into master will decrease coverage by 0.18%.
The diff coverage is 60%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10822      +/-   ##
==========================================
- Coverage   62.79%    62.6%   -0.19%     
==========================================
  Files         391      391              
  Lines       37318    37323       +5     
==========================================
- Hits        23433    23366      -67     
- Misses      12297    12359      +62     
- Partials     1588     1598      +10
Impacted Files Coverage Δ
raft/raft.go 91.98% <60%> (-0.23%) ⬇️
client/client.go 48.03% <0%> (-35.95%) ⬇️
clientv3/ordering/kv.go 58.82% <0%> (-26.48%) ⬇️
clientv3/leasing/util.go 88.33% <0%> (-10%) ⬇️
etcdserver/api/v3rpc/watch.go 76.14% <0%> (-4.25%) ⬇️
proxy/grpcproxy/watcher.go 85.71% <0%> (-4.09%) ⬇️
pkg/transport/listener.go 51.18% <0%> (-3.8%) ⬇️
clientv3/leasing/txn.go 88.09% <0%> (-3.18%) ⬇️
clientv3/client.go 76.27% <0%> (-1.7%) ⬇️
proxy/grpcproxy/lease.go 78.28% <0%> (-0.91%) ⬇️
... and 19 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 2c5162a...c844526. Read the comment docs.

@xiang90
Copy link
Contributor

xiang90 commented Jun 17, 2019

lgtm

Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

/cc @jingyih

@gyuho gyuho merged commit 53891cb into etcd-io:master Jun 17, 2019
absolute8511 added a commit to youzan/ZanRedisDB that referenced this pull request Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants