-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Rework persistence to not have a table per namespace #613
Comments
One other point that came up:
The problematic part here is that we might have the relation inside a subject set in a different namespace. This prevents us (currently) from just using One remedy for renaming might be to use relation IDs instead of relation strings like we do with namespaces and their IDs. Alternatively it might make sense to not store the encoded subject set in the subject column, but instead store it decoded somehow. |
An overview of all the features and issues we want to address with this. This is really an exhausting list and I am pretty sure that there are features Keto will not support any time soon, but they are still worth considering now.
|
ProposalAbove list has a lot of features that we might be able to implement better and more performant by not having subject sets in the encoded form. Rather, I would like to have the following polymorphic table:
The primary key would be (Network ID, Namespace, Tuple ID) Each row either has the Alt 1: two tables for each type of tupleDrawbacks compared to proposal:
Advantages:
Alt 2: table with the encoded subject as it is now:Drawbacks compared to proposal:
DELETE FROM relation_tuples WHERE subject LIKE 'namespace-to-be-deleted#%'
Advantages:
|
What does the original paper say about this? |
By the way, FTS indices are not yet implemented in CRDB: cockroachdb/cockroach#7821 |
I might not have put it clearly, my preferred proposal is the polymorphic table with decoded subject sets. The other alternatives are just ideas I had but don't like because of the drawbacks.
They don't really talk about how subject sets or subject IDs are handled. |
Is your feature request related to a problem? Please describe.
Currently we have tables per namespace. This decision was made based on the idea to have storage specific settings (like additional indexes) per namespace (outlined in #303). The problem with that is that it is not scaling well in terms of maintenance and performance in some cases.
Describe the solution you'd like
A much more scalable solution will be to use a single table that has a namespace column. We might still be able to move back to separate tables by implementing another persister, but that is a topic for when the APIs are considered stable.
Additional context
from #303
cockroachdb/cockroach#63206
The text was updated successfully, but these errors were encountered: