Skip to content

Commit 1e9179c

Browse files
authored
Update database delete behavior for InfluxDB Cloud Dedicated (#5942)
* update dedicated database delete behavior * removed db name reuse warning from influxctl database create * added warnings to wait write to a reused db name
1 parent 7e34359 commit 1e9179c

File tree

3 files changed

+44
-38
lines changed

3 files changed

+44
-38
lines changed

content/influxdb3/cloud-dedicated/admin/databases/delete.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,21 @@ related:
2929
---
3030

3131
Use the [`influxctl` CLI](/influxdb3/cloud-dedicated/reference/cli/influxctl/)
32-
or the [Management HTTP API](/influxdb3/cloud-dedicated/api/management/) to create a database in your {{< product-name omit=" Clustered" >}} cluster.
32+
or the [Management HTTP API](/influxdb3/cloud-dedicated/api/management/)
33+
to delete a database from your {{< product-name omit=" Clustered" >}} cluster.
3334

3435
> [!Warning]
3536
>
3637
> #### Deleting a database cannot be undone
3738
>
3839
> Once a database is deleted, data stored in that database cannot be recovered.
39-
>
40-
> #### Cannot reuse database names
41-
>
42-
> After a database is deleted, you cannot reuse the same name for a new database.
40+
>
41+
> #### Wait before writing to a new database with the same name
42+
>
43+
> After deleting a database from your {{% product-name omit=" Clustered" %}}
44+
> cluster, you can reuse the name to create a new database, but **wait two to
45+
> three minutes** after deleting the previous database before writing to the new
46+
> database to allow write caches to clear.
4347
4448
{{< tabs-wrapper >}}
4549
{{% tabs %}}
@@ -50,13 +54,15 @@ or the [Management HTTP API](/influxdb3/cloud-dedicated/api/management/) to crea
5054

5155
<!------------------------------- BEGIN INFLUXCTL ----------------------------->
5256

53-
1. If you haven't already, [download and install the `influxctl` CLI](/influxdb3/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl), and then [configure an `influxctl` connection profile](/influxdb3/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) for your cluster.
57+
1. If you haven't already,
58+
[download and install the `influxctl` CLI](/influxdb3/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl), and then [configure an `influxctl` connection profile](/influxdb3/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles)
59+
for your cluster.
5460

55-
2. In your terminal, run the `influxctl database delete` command and provide the following:
61+
2. In your terminal, run the `influxctl database delete` command and provide the following:
5662

57-
- Name of the database to delete
63+
- The name of the database to delete
5864

59-
3. Confirm that you want to delete the database.
65+
3. Confirm that you want to delete the database.
6066

6167
{{% code-placeholders "DATABASE_NAME" %}}
6268

@@ -73,23 +79,26 @@ influxctl database delete DATABASE_NAME
7379

7480
_This example uses [cURL](https://curl.se/) to send a Management HTTP API request, but you can use any HTTP client._
7581

76-
1. If you haven't already, follow the instructions to [install cURL](https://everything.curl.dev/install/index.html) for your system.
77-
2. In your terminal, use cURL to send a request to the following {{% product-name %}} endpoint:
82+
1. If you haven't already, follow the instructions to [install cURL](https://everything.curl.dev/install/index.html) for your system.
83+
2. In your terminal, use cURL to send a request to the following {{% product-name %}} endpoint:
7884

79-
{{% api-endpoint endpoint="https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" method="delete" api-ref="/influxdb3/cloud-dedicated/api/management/#operation/DeleteClusterDatabase" %}}
85+
{{% api-endpoint endpoint="https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" method="delete" api-ref="/influxdb3/cloud-dedicated/api/management/#operation/DeleteClusterDatabase" %}}
8086

81-
In the URL, provide the following:
87+
In the URL, provide the following:
8288

83-
- `ACCOUNT_ID`: The ID of the [account](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that the cluster belongs to _(see how to [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
84-
- `CLUSTER_ID`: The ID of the [cluster](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that you want to manage _(see how to [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
85-
- `DATABASE_NAME`: The name of the [database](/influxdb3/cloud-dedicated/admin/databases/) that you want to delete _(see how to [list databases](/influxdb3/cloud-dedicated/admin/databases/list/))_.
89+
- `ACCOUNT_ID`: The ID of the [account](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster)
90+
that the cluster belongs to _(see how to [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
91+
- `CLUSTER_ID`: The ID of the [cluster](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster)
92+
that you want to manage _(see how to [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_.
93+
- `DATABASE_NAME`: The name of the [database](/influxdb3/cloud-dedicated/admin/databases/)
94+
that you want to delete _(see how to [list databases](/influxdb3/cloud-dedicated/admin/databases/list/))_.
8695

87-
Provide the following request headers:
96+
Provide the following request headers:
8897

89-
- `Accept: application/json` to ensure the response body is JSON content
90-
- `Authorization: Bearer` and a [Management API token](/influxdb3/cloud-dedicated/admin/tokens/management/) for your cluster _(see how to [create a management token](/influxdb3/cloud-dedicated/admin/tokens/management/) for Management API requests)_.
98+
- `Accept: application/json` to ensure the response body is JSON content
99+
- `Authorization: Bearer` and a [Management API token](/influxdb3/cloud-dedicated/admin/tokens/management/) for your cluster _(see how to [create a management token](/influxdb3/cloud-dedicated/admin/tokens/management/) for Management API requests)_.
91100

92-
Specify the `DELETE` request method.
101+
Specify the `DELETE` request method.
93102

94103
The following example shows how to use the Management API to delete a database:
95104

content/influxdb3/cloud-dedicated/reference/cli/influxctl/database/create.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,12 @@ Be sure to follow [partitioning best practices](/influxdb3/cloud-dedicated/admin
6969
> Otherwise, InfluxDB omits time from the partition template and won't compact partitions.
7070
7171
> [!Warning]
72-
> #### Cannot reuse deleted database names
73-
>
74-
> You cannot reuse the name of a deleted database when creating a new database.
75-
> If you try to reuse the name, the API response status code
76-
> is `400` and the `message` field contains the following:
77-
>
78-
> ```text
79-
> 'iox_proxy.app.CreateDatabase failed to create database: \
80-
> rpc error: code = AlreadyExists desc = A namespace with the
81-
> name `<DATABASE_NAME>` already exists'
82-
> ```
72+
> #### Wait before writing to a new database with the same name as a deleted database
73+
>
74+
> After deleting a database from your {{% product-name omit=" Clustered" %}}
75+
> cluster, you can reuse the name to create a new database, but **wait two to
76+
> three minutes** after deleting the previous database before writing to the new
77+
> database to allow write caches to clear.
8378
8479
## Usage
8580

content/influxdb3/cloud-dedicated/reference/cli/influxctl/database/delete.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ menu:
99
weight: 301
1010
---
1111

12-
The `influxctl database delete` command deletes a database from an InfluxDB
13-
Cloud Dedicated cluster.
12+
The `influxctl database delete` command deletes a database from an
13+
{{< product-name omit=" Clustered" >}} cluster.
1414

1515
## Usage
1616

@@ -25,11 +25,13 @@ influxctl database delete [command options] [--force] <DATABASE_NAME> [<DATABASE
2525
> #### Cannot be undone
2626
>
2727
> Deleting a database is a destructive action that cannot be undone.
28-
>
29-
> #### Cannot reuse deleted database names
30-
>
31-
> After deleting a database, you cannot reuse the name of the deleted database
32-
> when creating a new database.
28+
>
29+
> #### Wait before writing to a new database with the same name
30+
>
31+
> After deleting a database from your {{% product-name omit=" Clustered" %}}
32+
> cluster, you can reuse the name to create a new database, but **wait two to
33+
> three minutes** after deleting the previous database before writing to the new
34+
> database to allow write caches to clear.
3335
3436
## Arguments
3537

0 commit comments

Comments
 (0)