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

Remove writelock to improve the read throughput. #191

Merged
merged 1 commit into from Apr 11, 2019

Conversation

Projects
None yet
2 participants
@longfin
Copy link
Member

commented Apr 11, 2019

This PR removes the write lock on BlockChain<T>.MineBlock() to increase the read throughput. Since BlockChain<T>.Append() already has the write lock, it can be assumed that minimal consistency is guaranteed.

@dahlia

dahlia approved these changes Apr 11, 2019

@codecov

This comment has been minimized.

Copy link

commented Apr 11, 2019

Codecov Report

Merging #191 into master will decrease coverage by 3.14%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #191      +/-   ##
==========================================
- Coverage   87.37%   84.22%   -3.15%     
==========================================
  Files          72       72              
  Lines        3296     3291       -5     
==========================================
- Hits         2880     2772     -108     
- Misses        416      519     +103
Impacted Files Coverage Δ
Libplanet/Blockchain/BlockChain.cs 98.34% <100%> (-0.04%) ⬇️
Libplanet/Net/IceServer.cs 0% <0%> (-100%) ⬇️
Libplanet/Net/IceServerException.cs 0% <0%> (-100%) ⬇️
Libplanet/Net/NetworkStreamProxy.cs 0% <0%> (-80.77%) ⬇️
Libplanet/Net/Swarm.cs 82.55% <0%> (-5.48%) ⬇️

@longfin longfin merged commit 65bc8cd into planetarium:master Apr 11, 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 87.37%)
Details
codecov/project Absolute coverage decreased by -3.14% but relative coverage increased by +12.62% compared to c25a4ca
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.