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

Improve lru read concurrency #1038

Merged

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented May 16, 2023

Description

Improve read concurrency on LRU cache. It now directly read the ets table instead of requesting it to the LRU GenServer. The GenServer is only used to manage the LRU workflow (monitor cache size, add value in ets table and remove old value when max size is reached).

Also move the ChainIndex LRU to be started in Embedded Supervisor instead of being linked to ChainIndex

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Unit test + manual test on lot of datas

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Neylix Neylix added DB Involve database enhancements labels May 16, 2023
@Neylix Neylix force-pushed the Improve-LRU-read-concurrency branch from de635dc to 7bf3f3b Compare May 16, 2023 09:12
@Neylix Neylix force-pushed the Improve-LRU-read-concurrency branch from 7bf3f3b to c633835 Compare May 16, 2023 09:18
@Neylix Neylix merged commit 18e4fd0 into archethic-foundation:1.1.0 May 16, 2023
@Neylix Neylix deleted the Improve-LRU-read-concurrency branch May 16, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB Involve database enhancements
Projects
Status: Done 🍻
Development

Successfully merging this pull request may close these issues.

None yet

3 participants