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

lease: Lookup non-blocking with concurrent Grant/Revoke #9229

Merged
merged 1 commit into from
Feb 27, 2018

Conversation

ximenzaoshi
Copy link

Contributing guidelines

lease: Change lease Mutex to RWMutex

When the lease gets huge, etcd costs too much time on lease map ranging, leading to updating requests timeout. Change the Mutex to RWMutex may be helpful.

related: #9159
[contributing]: https://github.com/coreos/etcd/blob/master/CONTRIBUTING.md#contribution-flow

@codecov-io
Copy link

Codecov Report

Merging #9229 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9229      +/-   ##
==========================================
+ Coverage   75.87%   75.91%   +0.03%     
==========================================
  Files         363      363              
  Lines       30161    30161              
==========================================
+ Hits        22884    22896      +12     
+ Misses       5670     5663       -7     
+ Partials     1607     1602       -5
Impacted Files Coverage Δ
lease/lessor.go 86.52% <100%> (ø) ⬆️
clientv3/namespace/watch.go 87.87% <0%> (-12.13%) ⬇️
etcdserver/api/v3rpc/lease.go 78.37% <0%> (-8.11%) ⬇️
etcdctl/ctlv3/command/lease_command.go 65.34% <0%> (-5.95%) ⬇️
pkg/testutil/recorder.go 77.77% <0%> (-3.71%) ⬇️
lease/leasehttp/http.go 62.5% <0%> (-2.95%) ⬇️
etcdserver/api/v3election/election.go 64.7% <0%> (-2.95%) ⬇️
etcdserver/api/v3rpc/watch.go 83.69% <0%> (-1.72%) ⬇️
etcdserver/cluster_util.go 76.64% <0%> (-1.46%) ⬇️
clientv3/op.go 72.56% <0%> (-1.33%) ⬇️
... and 16 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 37f577c...4822116. Read the comment docs.

@ximenzaoshi
Copy link
Author

cc @xiang90

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.

lgtm

@gyuho gyuho merged commit 659224b into etcd-io:master Feb 27, 2018
@gyuho gyuho changed the title lease: Change lease Mutex to RWMutex lease: make "Lookup" non-blocking with no grant/revoke routine Feb 27, 2018
@ximenzaoshi ximenzaoshi deleted the lease-fix branch February 27, 2018 06:11
@gyuho gyuho changed the title lease: make "Lookup" non-blocking with no grant/revoke routine lease: Lookup non-blocking with concurrent Grant/Revoke Feb 27, 2018
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.

3 participants