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

libsql-server: use LRU cache to store active namespaces #743

Closed
wants to merge 1 commit into from

Conversation

psarna
Copy link
Contributor

@psarna psarna commented Dec 1, 2023

This is a port of Marin's libsql/sqld#689

This PR replaces the namespace store dumb hashmap with an LRU cache to bound the maximum number of namespaces loaded into memory while unbounding the number of namespaces allocated on a sqld instance. Additionally, this enables fully concurrent access to namespaces by removing the global lock on the namespace store.

This is a port of Marin's libsql/sqld#689

This PR replaces the namespace store dumb hashmap with an LRU cache to bound
the maximum number of namespaces loaded into memory while unbounding the number
of namespaces allocated on a sqld instance.  Additionally, this enables fully
concurrent access to namespaces by removing the global lock on the namespace
store.

Co-authored-by: Piotr Sarna <[email protected]>
@psarna psarna requested a review from MarinPostma December 1, 2023 12:32
@psarna
Copy link
Contributor Author

psarna commented Dec 1, 2023

(I'll close and reopen from the original repo, not my fork)

@psarna psarna closed this Dec 1, 2023
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.

1 participant