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

Fixes issue 2627: Use cache db for BanManager #2635

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

hewison-chris
Copy link
Contributor

Replace file storage with database tables in cache db.

@hewison-chris hewison-chris linked an issue Nov 3, 2021 that may be closed by this pull request
@hewison-chris hewison-chris requested a review from Geod24 November 3, 2021 06:40
@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #2635 (5306dc9) into v0.x.x (8900629) will increase coverage by 0.33%.
The diff coverage is 84.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           v0.x.x    #2635      +/-   ##
==========================================
+ Coverage   88.12%   88.45%   +0.33%     
==========================================
  Files         155      155              
  Lines       15096    15181      +85     
==========================================
+ Hits        13303    13429     +126     
+ Misses       1793     1752      -41     
Flag Coverage Δ
integration 34.86% <ø> (-3.93%) ⬇️
unittests 87.74% <84.84%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
source/agora/test/Base.d 79.43% <ø> (-0.14%) ⬇️
source/agora/common/BanManager.d 86.48% <84.37%> (-7.46%) ⬇️
source/agora/network/Manager.d 76.52% <100.00%> (+0.15%) ⬆️
source/agora/network/Clock.d 75.00% <0.00%> (-6.25%) ⬇️
source/agora/consensus/EnrollmentManager.d 96.03% <0.00%> (-0.31%) ⬇️
source/agora/consensus/validation/Transaction.d 97.78% <0.00%> (-0.25%) ⬇️
source/agora/consensus/Ledger.d 95.04% <0.00%> (-0.13%) ⬇️
source/agora/consensus/protocol/Nominator.d 89.68% <0.00%> (ø)
source/agora/node/main.d 48.88% <0.00%> (ø)
source/agora/node/Validator.d 93.52% <0.00%> (+1.76%) ⬆️
... and 5 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 8900629...5306dc9. Read the comment docs.

@hewison-chris hewison-chris force-pushed the issue2627_banned_cache_db branch from 56bf640 to 9e94e2c Compare November 3, 2021 07:12
@hewison-chris hewison-chris force-pushed the issue2627_banned_cache_db branch from 9e94e2c to dc94b06 Compare November 3, 2021 07:55
@hewison-chris hewison-chris force-pushed the issue2627_banned_cache_db branch 2 times, most recently from 6a909f1 to c91c617 Compare November 4, 2021 22:18
doc/Database.md Show resolved Hide resolved
source/agora/common/BanManager.d Outdated Show resolved Hide resolved
@hewison-chris hewison-chris force-pushed the issue2627_banned_cache_db branch from c91c617 to ebe4586 Compare November 5, 2021 06:18
source/agora/common/BanManager.d Outdated Show resolved Hide resolved
source/agora/common/BanManager.d Outdated Show resolved Hide resolved
source/agora/common/BanManager.d Outdated Show resolved Hide resolved
@hewison-chris hewison-chris force-pushed the issue2627_banned_cache_db branch 3 times, most recently from f3db927 to 78f2529 Compare November 7, 2021 21:16
@hewison-chris
Copy link
Contributor Author

hewison-chris commented Nov 7, 2021

I will add fix for integration failure :
>>CI: nnode-2_1 | 2021-11-07 21:25:09,63 Warn [agora.common.BanManager] - BanManager: failed to insert whitelisted into cache database: error 19: UNIQUE constraint failed: whitelisted.url

Was git mishap.

@hewison-chris hewison-chris force-pushed the issue2627_banned_cache_db branch from 78f2529 to 57ccdf4 Compare November 8, 2021 00:16
To ease maintenance and support of Agora it is desirable to have the
info used by BanManager in the cache db rather than a binary file.
The io unit test for BanManager is also removed.
@hewison-chris hewison-chris force-pushed the issue2627_banned_cache_db branch from 57ccdf4 to 5306dc9 Compare November 8, 2021 21:56
@Geod24 Geod24 merged commit b631310 into bosagora:v0.x.x Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace banned.dat with table in cache.db
3 participants