Skip to content

Commit 8fdaa80

Browse files
DOCSP-17444 Make dropping a nonexistent database a noop (#174)
* DOCSP-17444 Make dropping a nonexistent database a noop * DOCSP-17444 updates for review feedback
1 parent 222c22a commit 8fdaa80

File tree

2 files changed

+11
-37
lines changed

2 files changed

+11
-37
lines changed

source/reference/cli/database/drop-database.txt

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
:depth: 2
1313
:class: singlecol
1414

15-
The ``dropDatabase`` command removes the specified database from the storage
16-
configuration. If you drop a database that contains one or more collections,
17-
the collections are also removed from the storage configuration.
15+
The ``dropDatabase`` command removes the specified database from the
16+
storage configuration. If you drop a database that contains one or more
17+
collections, the collections are also removed from the storage
18+
configuration.
1819

1920
.. _dl-drop-database-cmd-syntax:
2021

@@ -50,22 +51,12 @@ Parameters
5051
Output
5152
~~~~~~
5253

53-
The command prints the following output if the command succeeds. To check
54-
whether the database was dropped from the storage configuration, run
55-
the ``show dbs`` and ``storageGetConfig`` commands. If the command prints errors,
54+
The command prints the following output if the command succeeds or if
55+
there is no database with the specified name to drop. To check whether
56+
the database was dropped from the storage configuration, run the ``show
57+
dbs`` and ``storageGetConfig`` commands. If the command prints errors,
5658
see :ref:`dl-drop-database-cmd-errors` below for recommended solutions.
5759

58-
.. code-block:: json
59-
:copyable: false
60-
61-
{ "ok" : 1, "dropped" : "<database>" }
62-
63-
where ``<database>`` is the name of the database that was dropped from
64-
the storage configuration.
65-
66-
If there is no active database to drop and therefore no database was dropped,
67-
the command returns the following output:
68-
6960
.. code-block:: json
7061
:copyable: false
7162

@@ -90,7 +81,7 @@ The previous command prints the following output:
9081
.. code-block:: json
9182
:copyable: false
9283

93-
{ "ok" : 1, "dropped" : "egS3Store" }
84+
{ "ok" : 1 }
9485

9586
.. _dl-drop-database-cmd-errors:
9687

source/reference/cli/stores/drop-store.txt

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fails, see :ref:`dl-drop-store-cmd-errors` for recommended solutions.
5656

5757
.. code-block:: json
5858

59-
{ "ok" : 1, "dropped" : "<store-name>" }
59+
{ "ok" : 1 }
6060

6161
.. _dl--cmd-egs:
6262

@@ -77,7 +77,7 @@ The previous command prints the following output:
7777
.. code-block:: json
7878
:copyable: false
7979

80-
{ "ok" : 1, "dropped" : "myStore" }
80+
{ "ok" : 1 }
8181

8282
.. _dl-drop-store-cmd-errors:
8383

@@ -100,20 +100,3 @@ If the command fails, it returns one of the following errors.
100100

101101
**Solution:** First :ref:`drop the dependent collections
102102
<dl-drop-collection-views-cmd>`, then re-run the ``dropStore`` command.
103-
104-
**Reason:** The specified {+data-lake-store+} doesn't exist.
105-
106-
.. code-block:: json
107-
:copyable: false
108-
109-
{
110-
"ok" : 0,
111-
"errmsg" : "nonexistent store",
112-
"code" : 2,
113-
"codeName" : "BadValue"
114-
}
115-
116-
**Solution:** Ensure that the {+data-lake-store+} specified in the
117-
command exists in the storage configuration. You can use
118-
the :ref:`dl-list-stores-cmd` command to retrieve a list of valid
119-
{+data-lake-stores+} in the storage configuration.

0 commit comments

Comments
 (0)