Skip to content

Commit 7bfe5e3

Browse files
author
Frannie-Ludmilla
committed
Update page errors.adoc
1 parent e4cc7a1 commit 7bfe5e3

File tree

1 file changed

+23
-48
lines changed
  • modules/ROOT/pages/database-administration/standard-databases

1 file changed

+23
-48
lines changed

modules/ROOT/pages/database-administration/standard-databases/errors.adoc

Lines changed: 23 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -160,75 +160,50 @@ It produces a database dump that can be further examined and potentially repaire
160160
[[quarantine]]
161161
== Quarantined databases
162162

163-
There are two ways to get a database into a `quarantined` state:
164-
165-
* By using the xref:procedures.adoc#procedure_dbms_quarantineDatabase[`dbms.quarantineDatabase`] procedure locally to isolate a specific database.
166-
The procedure must be executed on the instance whose copy of the database you want to quarantine.
167-
A reason for that can be, for example, when a database is unable to start on a given instance due to a file system permissions issue with the volume where the database is located or when a recently started database begins to log errors.
168-
The quarantine state renders the database inaccessible on that instance and prevents its state from being changed, for example, with the `START DATABASE` command.
169-
+
170-
[NOTE]
171-
====
172-
If running in a cluster, database management commands such as `START DATABASE foo` will still take effect on the instances which have *not* quarantined `foo`.
173-
====
174-
175-
* When a database encounters a severe error during its normal run, which prevents it from a further operation, Neo4j stops that database and brings it into a `quarantined` state.
163+
When a database encounters a severe error during its normal run, which prevents it from a further operation, Neo4j stops that database and brings it into a `quarantined` state.
176164
Meaning, it is not possible to restart it with a simple `START DATABASE` command.
177-
You have to execute `CALL dbms.quarantineDatabase(databaseName, false)` on the instance with the failing database in order to lift the quarantine.
165+
You have to execute `CALL dbms.unquarantineDatabase(server, databaseName, operation)` in order to lift the quarantine, specifying as `server` the instance with the failing database.
178166

179167
After lifting the quarantine, the instance will automatically try to bring the database to the desired state.
180168

181-
[NOTE]
182-
====
183-
It is recommended to run the quarantine procedure over the `bolt://` protocol rather than `neo4j://`, which may route requests to unexpected instances.
184-
====
185-
186169
*Syntax:*
187170

188-
`CALL dbms.quarantineDatabase(databaseName,setStatus,reason)`
171+
`CALL dbms.unquarantineDatabase(server, databaseName, operation)`
189172

190173
*Arguments:*
191174

192175
[options="header"]
193176
|===
194177
| Name | Type | Description
178+
| `server` | String | The identifier of the server where the quarantine for database will be lifted.
195179
| `databaseName` | String | The name of the database that will be put into or removed from quarantine.
196-
| `setStatus` | Boolean | `true` for placing the database into quarantine; `false` for lifting the quarantine.
197-
| `reason` | String | (Optional) The reason for placing the database in quarantine.
180+
| `operation` | String | Optional operation to apply while lifting the quarantine.
198181
|===
199182

183+
[NOTE]
184+
====
185+
The possible values for the optional operation are:
186+
187+
* `keepStateKeepStore` -- do nothing; leave store and cluster state as they are.
188+
* `replaceStateKeepStore` -- join as a new member, clearing the current cluster state but keeping the store.
189+
* `replaceStateReplaceStore` -- join as a new member, clearing both the current cluster state and the store.
190+
191+
If you choose to clear the current cluster state, the server will try to join as a new member,
192+
but this joining can succeed if and only if there is a majority of old members "letting" the new members in.
193+
Let's assume our cluster has a topology with three primaries.
194+
If there is only one server in `QUARANTINED` mode, then it is safe to choose `replaceStateKeepStore` or `replaceStateReplaceStore`.
195+
If there are two servers in `QUARANTINED` mode, then you should not use concurrently `replaceStateKeepStore` or `replaceStateReplaceStore` for both servers because there would be no majority to let them in.
196+
====
197+
200198
*Returns:*
201199

202-
[options="header"]
203-
|===
204-
| Name | Type | Description
205-
| `databaseName` | String | The name of the database.
206-
| `quarantined` | String | Actual state.
207-
| `result` | String | Result of the last operation.
208-
The result contains the user, the time, and the reason for the quarantine.
209-
|===
200+
The procedure doesn't return any value.
210201

211202
[NOTE]
212203
====
213-
The `dbms.quarantineDatabase` procedure replaces xref:procedures.adoc#procedure_dbms_cluster_quarantinedatabase[`dbms.cluster.quarantineDatabase`], which has been deprecated in Neo4j 4.3 and will be removed with the next major version.
204+
The `dbms.unquarantineDatabase` procedure replaces xref:procedures.adoc#procedure_dbms_quarantineDatabase[`dbms.quarantineDatabase`], which has been deprecated in Neo4j 5.26.
214205
====
215206

216-
.Quarantine a database
217-
[source, cypher]
218-
----
219-
neo4j@system> CALL dbms.quarantineDatabase("foo",true);
220-
----
221-
[queryresult]
222-
----
223-
+--------------------------------------------------------------------------------------+
224-
| databaseName | quarantined | result |
225-
+--------------------------------------------------------------------------------------+
226-
| "foo" | TRUE | "By neo4j at 2020-10-15T15:10:41.348Z: No reason given" |
227-
+--------------------------------------------------------------------------------------+
228-
229-
3 row available after 100 ms, consumed after another 6 ms
230-
----
231-
232207
.Check if a database is quarantined
233208
[source, cypher]
234209
----
@@ -251,7 +226,7 @@ neo4j@system> SHOW DATABASE foo;
251226
====
252227
A `quarantined` state is persisted for user databases.
253228
This means that if a database is quarantined, it will remain so even if that Neo4j instance is restarted.
254-
You can remove it only by running the xref:procedures.adoc#procedure_dbms_quarantineDatabase[`dbms.quarantineDatabase`] procedure on the instance where the quarantined database is located, passing `false` for the `setStatus` parameter.
229+
You can remove it only by running the xref:procedures.adoc#procedure_dbms_unquarantineDatabase[`dbms.unquarantineDatabase`] procedure.
255230
256231
The one exception to this rule is for the built-in `system` database.
257232
Any quarantine for that database is removed automatically after instance restart.

0 commit comments

Comments
 (0)