-
Notifications
You must be signed in to change notification settings - Fork 342
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
Shared schema #1080
Shared schema #1080
Conversation
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
} | ||
} | ||
tx.execute( | ||
"DELETE FROM namespace_configs WHERE namespace = ?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we also delete the link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link is removed above in lines 381-386.
fe0b0c4
to
f372af5
Compare
Thanks for a great review @MarinPostma! I applied all your suggestions - please have another look. |
Signed-off-by: Piotr Jastrzebski <piotr@chiselstrike.com>
f372af5
to
924e6f6
Compare
Redo of #1055
It basically stores the relationship between shared schema db and databases linked to it:
The relationships are stored in form of shared_schema_links table in the meta store of a shared-schema db.
When we create a dependent db, we store a link in shared-schema.
When we destroy dependent db, we remove link from shared-schema.
When we destroy shared-schema, we first check if all dependent dbs are already destroyed. We fail if they don't.
Some known decifiencies:
Forking a db that links to a shared schema should add a link between a new fork and a shared schema but doesn't do it right now.