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

Add resources argument in EvalForIndexer() #2952

Conversation

tolikzinovyev
Copy link
Contributor

Summary

This way Indexer can preload most things from the database efficiently.

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.

the change looks fine - but I'd like to request adding some testing for the saveResourcesInCowBase method. Testing it individually or via the EvalForIndexer wrapper is up to you.
i.e. the goal is to prove that the roundCowBase here would truly initialize its state by the method. The standard cowRoundBase interface should be used to validate the correctness rather than direct access to the underlying maps.

@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2021

Codecov Report

Merging #2952 (a95f0fa) into master (734e727) will increase coverage by 0.00%.
The diff coverage is 76.47%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2952   +/-   ##
=======================================
  Coverage   47.61%   47.61%           
=======================================
  Files         358      358           
  Lines       57906    57889   -17     
=======================================
- Hits        27570    27563    -7     
+ Misses      27208    27201    -7     
+ Partials     3128     3125    -3     
Impacted Files Coverage Δ
ledger/appcow.go 83.18% <0.00%> (+1.23%) ⬆️
ledger/evalIndexer.go 34.84% <50.00%> (-8.58%) ⬇️
ledger/eval.go 77.74% <100.00%> (-0.07%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
data/abi/abi_type.go 90.90% <0.00%> (-0.91%) ⬇️
network/wsPeer.go 74.37% <0.00%> (-0.84%) ⬇️
ledger/acctupdates.go 63.19% <0.00%> (-0.09%) ⬇️
network/wsNetwork.go 61.09% <0.00%> (ø)
data/transactions/verify/txn.go 44.29% <0.00%> (ø)
ledger/blockqueue.go 85.05% <0.00%> (+1.14%) ⬆️
... and 4 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 734e727...a95f0fa. Read the comment docs.

@tolikzinovyev tolikzinovyev force-pushed the tolik/eval-for-indexer-resources branch from 51255fc to a95f0fa Compare September 29, 2021 22:12
@tolikzinovyev
Copy link
Contributor Author

I added a test. Is this what you meant?

@tsachiherman
Copy link
Contributor

merged in #3019

@tolikzinovyev tolikzinovyev deleted the tolik/eval-for-indexer-resources branch October 8, 2021 15:52
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