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

Make LiteDBStore & FileStore to atomically store transactions #413

Merged
merged 5 commits into from Aug 9, 2019

Conversation

@dahlia
Copy link
Member

commented Aug 7, 2019

This patch is an alternative solution to the same problem that #411 aims to address.

@dahlia dahlia added the bug label Aug 7, 2019

@dahlia dahlia added this to the 0.5.0 milestone Aug 7, 2019

@dahlia dahlia requested review from longfin and earlbread Aug 7, 2019

@dahlia dahlia self-assigned this Aug 7, 2019

@dahlia dahlia force-pushed the dahlia:atomic-storic-txs branch from 2b2a84c to 3c491cb Aug 7, 2019

@dahlia dahlia dismissed stale reviews from earlbread and longfin via e345749 Aug 8, 2019

@dahlia dahlia force-pushed the dahlia:atomic-storic-txs branch 2 times, most recently from 0049b5d to b7fa968 Aug 8, 2019

@dahlia dahlia requested review from longfin and earlbread Aug 8, 2019

var random = new System.Random();
var md5 = MD5.Create();
Transaction<AtomicityTestAction> tx;
for (int j = 0; j < 50; j++)

This comment has been minimized.

Copy link
@earlbread

earlbread Aug 8, 2019

Member

Shouldn't this be txCount too?

This comment has been minimized.

Copy link
@dahlia

dahlia Aug 8, 2019

Author Member

Not necessarily; it's arbitrary.

@dahlia dahlia force-pushed the dahlia:atomic-storic-txs branch from b7fa968 to d6b028c Aug 8, 2019

@dahlia dahlia requested a review from earlbread Aug 8, 2019

@longfin
Copy link
Member

left a comment

There is a small glitch.

Libplanet/Net/Swarm.cs Outdated Show resolved Hide resolved

@dahlia dahlia force-pushed the dahlia:atomic-storic-txs branch from d6b028c to d195181 Aug 9, 2019

@dahlia dahlia requested review from longfin and earlbread Aug 9, 2019

@dahlia dahlia dismissed stale reviews from earlbread and longfin via 19c6132 Aug 9, 2019

@dahlia dahlia force-pushed the dahlia:atomic-storic-txs branch from d195181 to 19c6132 Aug 9, 2019

@dahlia dahlia requested review from longfin and earlbread Aug 9, 2019

@dahlia

This comment has been minimized.

Copy link
Member Author

commented Aug 9, 2019

@earlbread @longfin Sorry, I rebased it on the current master again.

@longfin
longfin approved these changes Aug 9, 2019
@codecov

This comment has been minimized.

Copy link

commented Aug 9, 2019

Codecov Report

Merging #413 into master will increase coverage by 0.05%.
The diff coverage is 89.67%.

@@            Coverage Diff             @@
##           master     #413      +/-   ##
==========================================
+ Coverage   88.11%   88.16%   +0.05%     
==========================================
  Files         198      198              
  Lines       14067    14226     +159     
==========================================
+ Hits        12395    12543     +148     
- Misses       1361     1371      +10     
- Partials      311      312       +1
Impacted Files Coverage Δ
Libplanet.Tests/Net/SwarmTest.cs 93.88% <100%> (-0.03%) ⬇️
Libplanet/Store/LiteDBStore.cs 90.15% <77.61%> (-0.42%) ⬇️
Libplanet/Net/Swarm.cs 78.5% <92.3%> (+0.11%) ⬆️
Libplanet.Tests/Store/StoreTest.cs 98.23% <95%> (-0.61%) ⬇️
Libplanet/Store/FileStore.cs 90.43% <95.45%> (+0.41%) ⬆️
Libplanet/Crypto/PrivateKey.cs 84.68% <0%> (-0.91%) ⬇️

@dahlia dahlia merged commit 54d91b8 into planetarium:master Aug 9, 2019

17 checks passed

WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 89.67% of diff hit (target 88.11%)
Details
codecov/project 88.16% (+0.05%) compared to 69869ef
Details
docs Libplanet docs generated by DocFX
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20190809.5 had test failures
Details
planetarium.libplanet (Linux_Mono) Linux_Mono succeeded
Details
planetarium.libplanet (Linux_NETCore) Linux_NETCore succeeded
Details
planetarium.libplanet (Windows_Mono) Windows_Mono succeeded
Details
planetarium.libplanet (Windows_NETCore) Windows_NETCore succeeded
Details
planetarium.libplanet (Windows_NETCore_Benchmark) Windows_NETCore_Benchmark succeeded
Details
planetarium.libplanet (Windows_NETCore_coverage) Windows_NETCore_coverage succeeded
Details
planetarium.libplanet (Windows_NETFramework) Windows_NETFramework succeeded
Details
planetarium.libplanet (macOS_Mono) macOS_Mono succeeded
Details
planetarium.libplanet (macOS_NETCore) macOS_NETCore succeeded
Details
planetarium.libplanet (macOS_Unity) macOS_Unity succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.