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

introduce a more robust cache eviction mechanism #2216

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tudor-malene
Copy link
Collaborator

Why this change is needed

the newHeads subscription is not entirely reliable, and in case of delays, we can get inconsistent results.

What changes were made as part of this PR

  • introduce a ticker to evict the cache even if the new Head is delayed

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

Copy link
Contributor

@zkokelj zkokelj left a comment

Choose a reason for hiding this comment

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

LGTM

Not invalidating cache for those values can cause issues.

Do we have any data on how unreliable new heads are?

@tudor-malene
Copy link
Collaborator Author

Do we have any data on how unreliable new heads are?

More like a hunch. I'm not sure this is the real reason. I'll run a few tests

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