-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add drop database #25523
Comments
@pauldix - high level queries on this feature,
|
I think in this case, we want a separate CLI from the The CLI command could follow how we delete last caches, which I think is like:
i.e.,
Perhaps talking about the feature as |
Yes, I was thinking of |
This is correct. For now we'd like any modification/configuration/write operations outside of the query path. We may want to change this at some point. Most other DBs, even ones with custom configuration usually expose their config in the query language. We may want to do this? I'm not sure yet. Mostly I want to optimize for usability while also keeping people from shooting themselves in the foot. |
@pauldix in that case can I use the following syntax for now? That will keep it completely out of the query path. Maybe we can revisit the
I think this is still valid, if we soft delete should they appear in |
For now show them as soft deleted |
This commit allows to soft delete database using `influxdb3 database delete <db_name>`. The write buffer and last value cache are cleared as well. closes: #25523
This commit allows soft deletion of database using `influxdb3 database delete <db_name>` command. The write buffer and last value cache are cleared as well. closes: #25523
We need a way to drop a database by name. This should be an HTTP API in the same area where we set options for last value cache, etc. We'll also want to add support to issue the command via the CLI. By default, the CLI should prompt the user to confirm they want to do the operation. There should be a command line option to auto-confirm.
Under the covers, the server should look up the name and log into the WAL a catalog operation to drop the DB by its id and the time the command was issued. When this is applied to the catalog, the name of the DB should be updated to
{db_name} - {time of drop}
and a marker should be applied to the DB that states that it is soft deleted.The write buffer and last value caches should be cleared of any data they have for that dbid.
Actually deleting the underlying files and removing the old db from the Catalog will be a separate operation that we can create in the future.
We'll also want to have an undelete option, but that can be handled as separate follow up work.
The text was updated successfully, but these errors were encountered: