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

Tune lock in BlockChain<T> #217

Merged
merged 3 commits into from Apr 29, 2019

Conversation

Projects
None yet
3 participants
@longfin
Copy link
Member

commented Apr 25, 2019

This PR adjusts the locks on BlockChain<T>.

  • Removed unnecessary writer lock in BlockChain<T>.StageTransactions()
  • Adjust BlockChain<T>.GetState() locks to reduce locking period.

@longfin longfin force-pushed the longfin:feature/tune-blockchain-lock branch from 367f092 to 42a969a Apr 25, 2019

@longfin longfin requested review from dahlia and earlbread and removed request for dahlia Apr 25, 2019

@codecov

This comment has been minimized.

Copy link

commented Apr 25, 2019

Codecov Report

Merging #217 into master will decrease coverage by 0.24%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #217      +/-   ##
==========================================
- Coverage    84.1%   83.85%   -0.25%     
==========================================
  Files          75       75              
  Lines        3492     3488       -4     
==========================================
- Hits         2937     2925      -12     
- Misses        555      563       +8
Impacted Files Coverage Δ
Libplanet/Blockchain/BlockChain.cs 98.01% <100%> (-0.03%) ⬇️
Libplanet/Net/Swarm.cs 79.68% <0%> (-0.9%) ⬇️

@longfin longfin force-pushed the longfin:feature/tune-blockchain-lock branch from 42a969a to bee27da Apr 25, 2019

Show resolved Hide resolved CHANGES.md Outdated
Show resolved Hide resolved CHANGES.md Outdated

@longfin longfin force-pushed the longfin:feature/tune-blockchain-lock branch from bee27da to fbd0f6e Apr 26, 2019

Show resolved Hide resolved CHANGES.md Outdated

@longfin longfin dismissed stale reviews from dahlia and earlbread via 7f9ff17 Apr 29, 2019

@longfin longfin force-pushed the longfin:feature/tune-blockchain-lock branch from eb2e74b to 7f9ff17 Apr 29, 2019

@longfin

This comment has been minimized.

Copy link
Member Author

commented Apr 29, 2019

I've rebased (and made some changes related #212 ). cc @dahlia

@longfin longfin force-pushed the longfin:feature/tune-blockchain-lock branch from 7f9ff17 to ea5b69c Apr 29, 2019

@dahlia

dahlia approved these changes Apr 29, 2019

@dahlia dahlia merged commit 241b6b8 into planetarium:master Apr 29, 2019

5 checks passed

Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 100% of diff hit (target 84.1%)
Details
codecov/project Absolute coverage decreased by -0.24% but relative coverage increased by +15.89% compared to b3a0ceb
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.