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

Add LiteDBStore #269

Merged
merged 5 commits into from Jun 11, 2019

Conversation

Projects
None yet
3 participants
@longfin
Copy link
Member

commented Jun 3, 2019

This PR adds LiteDBStore as a new storage class that using LiteDB as its backend.

Compared to FileStore, the following improvements have been made.

  • Because LiteDB has its own cache layer, write performance has increased slightly. (20~30% faster on my laptop)
  • Easy to manage because the entire DB is managed with a single file.

@longfin longfin force-pushed the longfin:feature/litedb branch 7 times, most recently from 3a7e4a9 to fcbe8a9 Jun 3, 2019

@longfin longfin marked this pull request as ready for review Jun 3, 2019

@longfin longfin requested review from dahlia and earlbread Jun 3, 2019

@longfin longfin force-pushed the longfin:feature/litedb branch from 864c812 to dd19bc2 Jun 3, 2019

@longfin

This comment has been minimized.

Copy link
Member Author

commented Jun 3, 2019

I also added commit(dd19bc2) that introduces Microsoft.DotNet.Analyzers.Compatibility to check API compatibility.

@dahlia
Copy link
Member

left a comment

It's quote long, so I'm going to read further and leave more comments soon.

Show resolved Hide resolved CHANGES.md Outdated
Show resolved Hide resolved Libplanet/Store/LiteDBStore.cs Outdated
Show resolved Hide resolved Libplanet.Tests/Store/LiteDBStoreTest.cs Outdated
Show resolved Hide resolved Libplanet.Tests/Store/FileStoreFixture.cs Outdated
Show resolved Hide resolved Libplanet.Tests/Store/LiteDBStoreFixture.cs Outdated
Show resolved Hide resolved Libplanet/Store/LiteDBStore.cs Outdated

@longfin longfin force-pushed the longfin:feature/litedb branch 3 times, most recently from 7b164ac to b2ab142 Jun 3, 2019

@longfin longfin requested review from dahlia and earlbread and removed request for dahlia Jun 4, 2019

@longfin longfin force-pushed the longfin:feature/litedb branch from b2ab142 to 7c7be37 Jun 8, 2019

@earlbread
Copy link
Member

left a comment

I changed FileStoreFixture to LiteDBStoreFixture, and some tests break. Maybe we need to add some test cases for LiteDB.

Show resolved Hide resolved Libplanet/Store/LiteDBStore.cs Outdated
Show resolved Hide resolved Libplanet/Store/LiteDBStore.cs Outdated
Show resolved Hide resolved Libplanet/Store/LiteDBStore.cs Outdated
Show resolved Hide resolved Libplanet/Store/LiteDBStore.cs Outdated

@longfin longfin force-pushed the longfin:feature/litedb branch 2 times, most recently from a6873d0 to b7c5627 Jun 10, 2019

longfin and others added some commits Jun 1, 2019

Update CHANGES.md
Co-Authored-By: Hong Minhee <hong.minhee@gmail.com>

@longfin longfin force-pushed the longfin:feature/litedb branch from b7c5627 to d5db09e Jun 11, 2019

@codecov

This comment has been minimized.

Copy link

commented Jun 11, 2019

Codecov Report

Merging #269 into master will increase coverage by 0.37%.
The diff coverage is 96.1%.

@@            Coverage Diff             @@
##           master     #269      +/-   ##
==========================================
+ Coverage   86.91%   87.29%   +0.37%     
==========================================
  Files         180      185       +5     
  Lines       11555    12041     +486     
==========================================
+ Hits        10043    10511     +468     
- Misses       1273     1291      +18     
  Partials      239      239
Impacted Files Coverage Δ
Libplanet.Tests/Store/FileStoreFixture.cs 100% <ø> (+10.1%) ⬆️
Libplanet.Stun/Stun/TurnClient.cs 0% <ø> (ø) ⬆️
Libplanet/Net/NetworkStreamProxy.cs 0% <ø> (ø) ⬆️
Libplanet.Tests/Store/FileStoreTest.cs 100% <100%> (+1.4%) ⬆️
Libplanet.Tests/Store/LiteDBStoreTest.cs 85.71% <85.71%> (ø)
Libplanet.Tests/Store/LiteDBStoreFixture.cs 91.66% <91.66%> (ø)
Libplanet/Store/LiteDBStore.cs 94.47% <94.47%> (ø)
Libplanet.Tests/Store/StoreFixture.cs 96.59% <96.59%> (ø)
Libplanet.Tests/Store/StoreTest.cs 98.4% <98.4%> (ø)
Libplanet/Crypto/PrivateKey.cs 84.68% <0%> (-0.91%) ⬇️
... and 6 more

@longfin longfin requested review from earlbread and dahlia Jun 11, 2019

@dahlia

dahlia approved these changes Jun 11, 2019

@longfin longfin merged commit 03caf77 into planetarium:master Jun 11, 2019

16 checks passed

Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 96.1% of diff hit (target 86.91%)
Details
codecov/project 87.29% (+0.37%) compared to 7662a85
Details
docs Libplanet docs generated by DocFX
Details
planetarium.libplanet Build #20190611.7 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
You can’t perform that action at this time.