Skip to content

Conversation

@algorandskiy
Copy link
Contributor

Summary

  • Moved code from acctupdates.go to trackerdb.go.
  • Extracted db creation and init fromaccountsInitialize to trackerDBInitialize
  • reloadLedger now calls trackerDBInitialize right after block db init
  • reloadLedger also has post-creation actions like vacuuming

Limitations:

  1. Tables creation still calls accountsInit for initial tables creation and inserting genesis accounts.
  2. Migration code still have some business logic.

Test Plan

Use existing test suite

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2021

Codecov Report

Merging #2984 (b06d29e) into master (ff8139a) will increase coverage by 0.01%.
The diff coverage is 41.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2984      +/-   ##
==========================================
+ Coverage   40.00%   40.01%   +0.01%     
==========================================
  Files         383      384       +1     
  Lines       86736    86749      +13     
==========================================
+ Hits        34699    34713      +14     
- Misses      46425    46426       +1     
+ Partials     5612     5610       -2     
Impacted Files Coverage Δ
ledger/accountdb.go 65.41% <ø> (-0.25%) ⬇️
ledger/tracker.go 68.75% <ø> (ø)
ledger/trackerdb.go 38.35% <38.35%> (ø)
ledger/ledger.go 60.15% <40.00%> (-0.98%) ⬇️
ledger/acctupdates.go 64.80% <71.42%> (+3.97%) ⬆️
ledger/catchupaccessor.go 64.85% <100.00%> (ø)
ledger/catchpointwriter.go 68.18% <0.00%> (-1.30%) ⬇️
cmd/tealdbg/debugger.go 49.24% <0.00%> (-1.01%) ⬇️
crypto/merkletrie/node.go 89.76% <0.00%> (-0.94%) ⬇️
... and 2 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 ff8139a...b06d29e. Read the comment docs.

@algorandskiy algorandskiy force-pushed the pavel/ledger-au-schema branch from 9aa9c22 to 8129027 Compare October 4, 2021 20:09
@algorandskiy
Copy link
Contributor Author

Not sure why it started the Branch build

Copy link
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

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

please review error/info messages and update the method names; looks good otherwise.

@tsachiherman tsachiherman merged commit 32e131c into algorand:master Oct 8, 2021
cce pushed a commit to cce/go-algorand that referenced this pull request Oct 28, 2021
## Summary

* Moved code from **acctupdates.go** to **trackerdb.go**.
* Extracted  db creation and init from`accountsInitialize` to `trackerDBInitialize`
* `reloadLedger` now calls `trackerDBInitialize` right after block db init
* `reloadLedger` also has post-creation actions like vacuuming

Limitations:
1. Tables creation still calls `accountsInit` for initial tables creation and inserting genesis accounts.
2. Migration code still have some business logic. 

## Test Plan

Use existing test suite
@egieseke egieseke mentioned this pull request Nov 23, 2021
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.

3 participants