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

Second approach to LiteDB's data corruption #387

Merged
merged 3 commits into from Aug 2, 2019

Conversation

@dahlia
Copy link
Member

commented Aug 2, 2019

It turns out that LiteDB's data corruption (mbdavid/LiteDB#1268) seems to happen due to sudden termination of program. So the workaround made in the previous workaround (#386) was reverted for the most part, and a new option named flush was added to LiteDBStore() constructor, so that every write is immediately flushed to disk. As a bonus, I made LiteDBStore.GetTransaction() method to treat corrupted transactions nonexistent, though I am not sure how would it be going and if work well together with other parts of Libplanet (I guess there could be some assumptions that once stored transactions must be existent in a store).

@dahlia dahlia added the bug label Aug 2, 2019

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

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

@dahlia dahlia self-assigned this Aug 2, 2019

@dahlia dahlia force-pushed the dahlia:treat-corrupted-tx-nonexistent branch from 6c16e1a to 681707f Aug 2, 2019

@codecov

This comment has been minimized.

Copy link

commented Aug 2, 2019

Codecov Report

Merging #387 into 9c-fft will decrease coverage by 0.04%.
The diff coverage is 65.21%.

@@            Coverage Diff            @@
##           9c-fft    #387      +/-   ##
=========================================
- Coverage   88.14%   88.1%   -0.05%     
=========================================
  Files         193     193              
  Lines       13720   13723       +3     
=========================================
- Hits        12094   12091       -3     
- Misses       1337    1344       +7     
+ Partials      289     288       -1
Impacted Files Coverage Δ
Libplanet/Store/LiteDBStore.cs 89.89% <65.21%> (-1.49%) ⬇️
dahlia added 3 commits Aug 2, 2019
Revert prev workaround for LiteDB and make it flush instead
It turns out that LiteDB's data corruption
(mbdavid/LiteDB#1268) seems to happen
due to sudden termination of program.  So the workaround made in the
previous patch (#386)
was reverted for the most part, and a new option named `flush` was
added to `LiteDBStore()` constructor.

@dahlia dahlia dismissed stale reviews from longfin and earlbread via 5f219aa Aug 2, 2019

@dahlia dahlia force-pushed the dahlia:treat-corrupted-tx-nonexistent branch from 681707f to 5f219aa Aug 2, 2019

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

@longfin
longfin approved these changes Aug 2, 2019

@dahlia dahlia merged commit 168ac4a into planetarium:9c-fft Aug 2, 2019

15 of 16 checks passed

codecov/patch 65.21% of diff hit (target 88.14%)
Details
WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/project 88.1% (-0.05%) compared to da9eea5
Details
docs Libplanet docs generated by DocFX
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20190802.8 succeeded
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_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.