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

fix: remove blocks cache displayed on /v2/blocks #787

Merged
merged 2 commits into from
Jul 13, 2022
Merged

Conversation

sborrazas
Copy link
Contributor

This was generating invalid results, because blocks were cached too much time.

It also provides very little performance benefit (if at all)

This was generating invalid results, because blocks were cached too much time.

It also provides very little performance benefit (if at all)
@sborrazas sborrazas requested review from thepiwo and jyeshe July 13, 2022 11:49
@sborrazas sborrazas self-assigned this Jul 13, 2022
Copy link
Member

@jyeshe jyeshe left a comment

Choose a reason for hiding this comment

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

These are integration tests for removal (related to this cache):

  1) test blocks it gets uncached generations with range (Integration.AeMdwWeb.BlockControllerTest)
     test/integration/ae_mdw_web/controllers/block_controller_test.exs:191
     ** (ArgumentError) argument error
     code: assert is_nil(EtsCache.get(@blocks_table, range_begin))
     stacktrace:
       (stdlib 3.12.1.2) :ets.lookup(AeMdw.Blocks, 623233)
       (ae_mdw 1.14.0) lib/ae_mdw/ets_cache.ex:30: AeMdw.EtsCache.get/2
       test/integration/ae_mdw_web/controllers/block_controller_test.exs:206: (test)

.

  2) test blocks get a mix of uncached and cached generations with range (Integration.AeMdwWeb.BlockControllerTest)
     test/integration/ae_mdw_web/controllers/block_controller_test.exs:211
     ** (ArgumentError) argument error
     code: EtsCache.get(@blocks_table, range_begin)
     stacktrace:
       (stdlib 3.12.1.2) :ets.lookup(AeMdw.Blocks, 623230)
       (ae_mdw 1.14.0) lib/ae_mdw/ets_cache.ex:30: AeMdw.EtsCache.get/2
       test/integration/ae_mdw_web/controllers/block_controller_test.exs:229: (test)

.

Finished in 6.6 seconds
18 tests, 2 failures

@jyeshe jyeshe self-requested a review July 13, 2022 17:24
@sborrazas sborrazas merged commit f1672c4 into master Jul 13, 2022
@sborrazas sborrazas deleted the blocks-cache branch July 13, 2022 19:18
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.

3 participants