-
Notifications
You must be signed in to change notification settings - Fork 278
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
Reduce memory usage of serve-testing
server in large test suites
#2048
Comments
@mateenkasim The problem is knowing when to "invalidate" a test has completed. We could add a custom API just for What would you prefer? |
I'd personally prefer your first solution – seems clearer and easier to debug if someone misuses it, especially if it had a distinctive name or fell under an obvious rpc service like Thanks for your help! |
@mateenkasim Thoughts on something like this?
|
That looks great – |
Yeah, they are. Good point |
Problem Statement
I wasn't sure how to label this as it's more of a concern than a bug or proposal, and it's not high priority for me.
Previous discussions in Discord:
In many testing paradigms, the DB state is torn down between tests. SpiceDB's
serve-testing
server mimics this by granting siloed DB states for every unique secret key. However, the server doesn't actually delete any of the data, since it doesn't know when the tests have completed. Because it's a memory datastore, this means memory usage increases monotonically.Between test suite runs, memory can be cleared by restarting the test SpiceDB instance. However, within a test suite, memory usage may quickly increase if some tests write a lot of relationships. Some mechanism to "tear down" those relationships at the end of the test would be awesome. Doing it by manually tracking writes and running DeleteRelationships would be possible, except for this comment by @vroldanbet:
Solution Brainstorm
No response
The text was updated successfully, but these errors were encountered: