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

cache: refactor, and fix of race condition between expiration goroutine and external calls. #134

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

colindickson
Copy link
Contributor

Solves #117

@colindickson
Copy link
Contributor Author

Notes:

Created private "lock-free" versions of the Add/Delete/Get/Len methods to be called internally. This way, the goroutine that is running which deletes expired items can acquire a write-lock on the map and do all of its work using these methods without worrying about a concurrent operation on the map.

@samcm
Copy link
Member

samcm commented Sep 18, 2023

Thanks @colindickson!!

@samcm
Copy link
Member

samcm commented Sep 18, 2023

Any chance you could look at the linting errors @colindickson? I'll merge + release once we're good to go :)

@colindickson
Copy link
Contributor Author

@samcm should be good now. :)

@samcm samcm merged commit 969f1ec into ethpandaops:master Sep 19, 2023
6 of 7 checks passed
@samcm
Copy link
Member

samcm commented Sep 19, 2023

Included in https://github.com/ethpandaops/checkpointz/releases/tag/v0.18.0! Thanks again @colindickson 🎉

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