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

320 rounds: Add LRU cache into online accounts tracker #3891

Conversation

algorandskiy
Copy link
Contributor

  • Added LRU cache to track the most recent updates into onlineaccounts table
  • TODO: add another cache for looking up since accounts can change
    and we need answers about specific round, not the most recent write round
  • Added online accounts tests for updates and expirations

@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2022

Codecov Report

Merging #3891 (8dedf1f) into feature/320-rounds (2d871d2) will increase coverage by 0.07%.
The diff coverage is 96.31%.

@@                  Coverage Diff                   @@
##           feature/320-rounds    #3891      +/-   ##
======================================================
+ Coverage               50.23%   50.30%   +0.07%     
======================================================
  Files                     393      395       +2     
  Lines                   69938    70063     +125     
======================================================
+ Hits                    35133    35247     +114     
- Misses                  30926    30930       +4     
- Partials                 3879     3886       +7     
Impacted Files Coverage Δ
ledger/persistedonlineaccts_list.go 92.00% <92.00%> (ø)
ledger/lruonlineaccts.go 93.75% <93.75%> (ø)
ledger/accountdb.go 72.50% <100.00%> (+0.33%) ⬆️
ledger/acctonline.go 70.87% <100.00%> (+1.28%) ⬆️
ledger/tracker.go 75.74% <100.00%> (+0.20%) ⬆️
network/wsPeer.go 68.33% <0.00%> (-2.50%) ⬇️
data/abi/abi_type.go 87.67% <0.00%> (-0.95%) ⬇️
data/transactions/verify/txn.go 44.15% <0.00%> (-0.87%) ⬇️
network/wsNetwork.go 62.99% <0.00%> (+0.19%) ⬆️
catchup/service.go 70.12% <0.00%> (+1.48%) ⬆️

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 2d871d2...8dedf1f. Read the comment docs.

* Added LRU cache to track the most recent updates into onlineaccounts table
* TODO: add another cache for looking up since accounts can change
        and we need answers about specific round, not the most recent write round
* Added online accounts tests for updates and expirations

Extend the test
@algorandskiy algorandskiy merged commit 01594c7 into algorand:feature/320-rounds Apr 19, 2022
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.

2 participants