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

Always keep a minimum of 2 active dbs open #4343

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

BeniaminDrasovean
Copy link
Contributor

@BeniaminDrasovean BeniaminDrasovean commented Aug 3, 2022

Description of the reasoning behind the pull request (what feature was missing / how the problem was manifesting itself / what was the motive behind the refactoring)

  • The pruning storer will keep only 3 db's open. When a snapshot takes longer than an epoch, it will close a db that is needed. To fix this case, always keep a minimum of 2 db's that are marked as active, opened.

Proposed Changes

  • Modify minNumOfActiveDBsNecessary from 1 to 2

Testing procedure

  • Add a time.Sleep() on Snapshot(), so that it will take more than 1 epoch, and check that the storer life was extended. After the snapshot is completed, verify that the correct db's are closed - (already tested this case)

@codecov-commenter
Copy link

Codecov Report

Merging #4343 (a833b56) into rc/2022-july (11e589f) will decrease coverage by 0.03%.
The diff coverage is n/a.

❗ Current head a833b56 differs from pull request most recent head b93697c. Consider uploading reports for the commit b93697c to get more accurate results

@@               Coverage Diff                @@
##           rc/2022-july    #4343      +/-   ##
================================================
- Coverage         73.74%   73.70%   -0.04%     
================================================
  Files               670      670              
  Lines             86388    86388              
================================================
- Hits              63707    63674      -33     
- Misses            17908    17941      +33     
  Partials           4773     4773              
Impacted Files Coverage Δ
storage/pruning/triePruningStorer.go 69.36% <ø> (+1.80%) ⬆️
p2p/libp2p/netMessenger.go 76.10% <0.00%> (-3.92%) ⬇️
storage/txcache/txListBySenderMap.go 97.50% <0.00%> (-2.50%) ⬇️
...t/processor/peerAuthenticationRequestsProcessor.go 94.40% <0.00%> (-2.40%) ⬇️

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 11e589f...b93697c. Read the comment docs.

@iulianpascalau iulianpascalau self-requested a review August 4, 2022 07:10
Copy link
Contributor

@popenta popenta left a comment

Choose a reason for hiding this comment

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

@@ Log scanner @@

snapshot-takes-too-long-fix

================================================================================

  • Known Warnings 14
  • New Warnings 6
  • Known Errors 0
  • New Errors 2
  • Panics 0
    ================================================================================

@BeniaminDrasovean BeniaminDrasovean merged commit af26fd3 into rc/2022-july Aug 4, 2022
@BeniaminDrasovean BeniaminDrasovean deleted the snapshot-takes-too-long-fix branch August 4, 2022 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants