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

indexer: Fix block cache pruning #498

Merged
merged 2 commits into from
Dec 27, 2023
Merged

indexer: Fix block cache pruning #498

merged 2 commits into from
Dec 27, 2023

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Dec 22, 2023

Block was never pruned from the blockDataByNumber cache so the cache kept growing indefinitely.

Also reduce the duplicate to-hex conversions in block indexing.

@ptrus ptrus requested a review from kostko as a code owner December 22, 2023 15:30
@ptrus ptrus force-pushed the ptrus/feature/reduce-allocs branch 2 times, most recently from 77b9e25 to 26b790c Compare December 22, 2023 15:33
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cd074b5) 61.86% compared to head (66a796d) 62.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #498      +/-   ##
==========================================
+ Coverage   61.86%   62.33%   +0.46%     
==========================================
  Files          37       37              
  Lines        3920     3921       +1     
==========================================
+ Hits         2425     2444      +19     
+ Misses       1288     1272      -16     
+ Partials      207      205       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ptrus ptrus changed the title indexer: Reduce number of toHex conversions indexer: Fix block cache pruning Dec 27, 2023
@ptrus ptrus force-pushed the ptrus/feature/reduce-allocs branch 2 times, most recently from 1c56354 to 7f8d027 Compare December 27, 2023 09:21
Block was never pruned from the `blockDataByNumber` cache.
@ptrus ptrus force-pushed the ptrus/feature/reduce-allocs branch from 7f8d027 to 66a796d Compare December 27, 2023 09:31
@ptrus ptrus merged commit d1b0e67 into main Dec 27, 2023
8 checks passed
@ptrus ptrus deleted the ptrus/feature/reduce-allocs branch December 27, 2023 09:43
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.

2 participants