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

mvcc: no need to hold tx lock when converting kvs to watch events #11701

Merged
merged 1 commit into from
Mar 20, 2020

Conversation

mlmhl
Copy link
Contributor

@mlmhl mlmhl commented Mar 17, 2020

Method kvsToEvents can take a long time if a large number of events need to be synchronized. However, this method does not access any shared resources, so it no need to hold the tx lock when executing. So we can move it outside to reduce lock holding time.

Method `kvsToEvents` can take a long time if a large number of events need to be synchronized. However, this method does not access any shared resources, so it no need to hold the tx lock when executing. So we can move it outside to reduce lock holding time.
@codecov-io
Copy link

Codecov Report

Merging #11701 into master will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11701      +/-   ##
==========================================
+ Coverage   66.36%   66.43%   +0.07%     
==========================================
  Files         402      402              
  Lines       36686    36686              
==========================================
+ Hits        24345    24371      +26     
+ Misses      10844    10811      -33     
- Partials     1497     1504       +7     
Impacted Files Coverage Δ
mvcc/watchable_store.go 84.34% <100.00%> (-0.36%) ⬇️
auth/options.go 47.50% <0.00%> (-45.00%) ⬇️
auth/jwt.go 56.17% <0.00%> (-21.35%) ⬇️
etcdserver/api/v3rpc/util.go 51.61% <0.00%> (-16.13%) ⬇️
auth/simple_token.go 76.47% <0.00%> (-12.61%) ⬇️
etcdserver/api/v3rpc/lease.go 74.68% <0.00%> (-7.60%) ⬇️
clientv3/namespace/watch.go 87.87% <0.00%> (-6.07%) ⬇️
proxy/grpcproxy/lease.go 79.18% <0.00%> (-4.08%) ⬇️
etcdserver/util.go 95.23% <0.00%> (-3.58%) ⬇️
clientv3/leasing/cache.go 87.22% <0.00%> (-1.67%) ⬇️
... 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 193e60e...9396666. Read the comment docs.

Copy link
Contributor

@jingyih jingyih left a comment

Choose a reason for hiding this comment

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

LGTM

@mlmhl
Copy link
Contributor Author

mlmhl commented Mar 20, 2020

@jingyih Could we merge this PR now?

@xiang90 xiang90 merged commit 0eee733 into etcd-io:master Mar 20, 2020
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