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

make laziness dynamic based on usage #3

Open
ldanilek opened this issue Sep 24, 2024 · 0 comments
Open

make laziness dynamic based on usage #3

ldanilek opened this issue Sep 24, 2024 · 0 comments

Comments

@ldanilek
Copy link
Collaborator

Currently the tree has a lazy root by default, which reduces contention when modifications are random. But if modifications are always at the end of the tree, or clustered in a single subtree, we are back to serializing all writes.

To fix this, we should make inner nodes become lazy dynamically when they are being written too quickly. Something like this:

https://stack.convex.dev/rate-limiting

And then if the node isn't written to for a while, we can make it non-lazy again.

Potentially we would want a cron to make it non-lazy in case there are a ton of writes all at once and then a read-heavy workload afterwards.

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

No branches or pull requests

1 participant