-
Notifications
You must be signed in to change notification settings - Fork 211
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
Support deletion of database #422
Comments
The problem with deleting a database is that every time dqlite restores its state, the deleted database will reappear unless the delete operation is part of the raft log. |
I see the point about the new command, but do we absolutely need a change in the dqlite wire protocol too? It feels that the new command could be simply triggered when we execute the |
Yes, that would make more sense and be simpler, thank you! |
cc @manadart, who requested this. Some questions:
As for how this should be exposed to clients: I prefer @MathieuBordere's original proposal to add a new request type to the wire protocol, rather than parsing SQL strings to look for |
I think in this case I prefer @freeekanayaka's proposal as SQLite doesn't support |
I'd say we'd just return an error to the client. Basically I'd expect the
If possible, any connection. But I'm not sure about the ramifications of that. In any case I believe at the moment we don't support multiple databases.
I'd say the FSM should fail to apply it and the node should go down or enter some permanent failure state. I can see in
I'm fine either way, I hadn't realize that SQLite does not support |
I thought about it a bit too, a separate wire protocol command is probably handier. Otherwise we will have to for example support preparing a |
Agree with @freeekanayaka. Return an error to the client.
Same again; any connection.
Won't affect us in Juju; don't mind how this is handled. |
SQLite doesn't support the "DROP database" SQL statement and says to delete the database file instead.
In dqlite's case it lives in memory. SQLite's xDelete VFS method to delete the in-memory file is implemented in dqlite, but can't be accessed through the go-dqlite client.
We should provide a way for a user to delete a database so that after reopening a deleted database, the database is pristine.
The text was updated successfully, but these errors were encountered: