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

Improve shard concurrency #3251

Closed

Conversation

miguelportilla
Copy link
Contributor

  • Reduce lock scope on all public functions
  • Use TaskQueue to process shard finalization in separate thread
  • Store shard last ledger hash and other info in backend
  • Use temp SQLite DB versus control file when acquiring

@codecov-io
Copy link

codecov-io commented Feb 7, 2020

Codecov Report

Merging #3251 into develop will decrease coverage by 0.25%.
The diff coverage is 4.96%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #3251      +/-   ##
===========================================
- Coverage    70.61%   70.36%   -0.26%     
===========================================
  Files          676      677       +1     
  Lines        54339    54530     +191     
===========================================
- Hits         38374    38369       -5     
- Misses       15965    16161     +196     
Impacted Files Coverage Δ
src/ripple/app/ledger/impl/InboundLedgers.cpp 27.62% <0.00%> (ø)
src/ripple/app/ledger/impl/LedgerMaster.cpp 42.07% <0.00%> (ø)
src/ripple/app/main/Main.cpp 40.13% <ø> (ø)
src/ripple/basics/TaggedCache.h 77.65% <ø> (ø)
src/ripple/core/Stoppable.h 93.75% <ø> (ø)
src/ripple/core/impl/JobQueue.cpp 89.85% <ø> (ø)
src/ripple/core/impl/Workers.h 100.00% <ø> (ø)
src/ripple/net/impl/RPCCall.cpp 94.91% <ø> (-0.16%) ⬇️
src/ripple/nodestore/DatabaseRotating.h 100.00% <ø> (ø)
src/ripple/nodestore/DatabaseShard.h 0.00% <ø> (ø)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b54d672...e35c2ec. Read the comment docs.

@miguelportilla miguelportilla force-pushed the shard_concurrency branch 2 times, most recently from d56bab8 to c79f17b Compare February 14, 2020 17:34
@miguelportilla
Copy link
Contributor Author

@undertome Issues with validate parameter fixed.

undertome
undertome previously approved these changes Feb 24, 2020
src/ripple/nodestore/impl/DatabaseShardImp.cpp Outdated Show resolved Hide resolved
src/ripple/nodestore/impl/DatabaseShardImp.cpp Outdated Show resolved Hide resolved
src/ripple/nodestore/impl/DatabaseShardImp.cpp Outdated Show resolved Hide resolved
src/ripple/nodestore/impl/DatabaseShardImp.cpp Outdated Show resolved Hide resolved
src/ripple/nodestore/impl/DatabaseShardImp.cpp Outdated Show resolved Hide resolved
src/ripple/nodestore/impl/Shard.cpp Show resolved Hide resolved
src/ripple/nodestore/impl/Shard.cpp Outdated Show resolved Hide resolved
src/ripple/nodestore/impl/Shard.cpp Outdated Show resolved Hide resolved
src/ripple/nodestore/impl/Shard.h Outdated Show resolved Hide resolved
src/test/basics/RangeSet_test.cpp Outdated Show resolved Hide resolved
@miguelportilla miguelportilla force-pushed the shard_concurrency branch 2 times, most recently from 94b8241 to 5a20ed0 Compare March 4, 2020 18:54
@carlhua carlhua requested a review from scottschurr March 5, 2020 14:30
ximinez
ximinez previously approved these changes Mar 5, 2020
ximinez
ximinez previously approved these changes Mar 5, 2020
@carlhua carlhua added Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. and removed Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. labels Mar 26, 2020
Copy link
Collaborator

@ximinez ximinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just found a few minor issues.

src/ripple/nodestore/impl/DatabaseShardImp.cpp Outdated Show resolved Hide resolved
src/ripple/nodestore/impl/DatabaseShardImp.cpp Outdated Show resolved Hide resolved
src/ripple/unity/nodestore.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@ximinez ximinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of really trivial nits. Otherwise, this looks good to go.

src/ripple/nodestore/impl/DatabaseShardImp.cpp Outdated Show resolved Hide resolved
src/ripple/nodestore/impl/DatabaseShardImp.cpp Outdated Show resolved Hide resolved
@miguelportilla miguelportilla force-pushed the shard_concurrency branch 2 times, most recently from e9f60c2 to ad638ff Compare March 30, 2020 19:17
ximinez
ximinez previously approved these changes Mar 30, 2020
Copy link
Collaborator

@ximinez ximinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

scottschurr
scottschurr previously approved these changes Mar 30, 2020
Copy link
Collaborator

@scottschurr scottschurr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The most recent commits look good to me. I left a belt-and-suspenders kind of a comment for your consideration. You can either choose to apply it or not as you see fit.

src/ripple/nodestore/impl/DatabaseShardImp.cpp Outdated Show resolved Hide resolved
@miguelportilla miguelportilla dismissed stale reviews from scottschurr and ximinez via 07ca43d March 31, 2020 02:14
Copy link
Collaborator

@scottschurr scottschurr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks great to me. Nice restructure.

Copy link
Collaborator

@ximinez ximinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@miguelportilla miguelportilla added the Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required. label Apr 1, 2020
This was referenced Apr 7, 2020
@manojsdoshi manojsdoshi mentioned this pull request Apr 8, 2020
@miguelportilla miguelportilla deleted the shard_concurrency branch June 2, 2020 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed Passed code review & PR owner thinks it's ready to merge. Perf sign-off may still be required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants