You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/database-administration/standard-databases/errors.adoc
+23-48Lines changed: 23 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,75 +160,50 @@ It produces a database dump that can be further examined and potentially repaire
160
160
[[quarantine]]
161
161
== Quarantined databases
162
162
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.
176
164
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.
178
166
179
167
After lifting the quarantine, the instance will automatically try to bring the database to the desired state.
180
168
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.
| `server` | String | The identifier of the server where the quarantine for database will be lifted.
195
179
| `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.
198
181
|===
199
182
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
+
200
198
*Returns:*
201
199
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.
210
201
211
202
[NOTE]
212
203
====
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.
3 row available after 100 ms, consumed after another 6 ms
230
-
----
231
-
232
207
.Check if a database is quarantined
233
208
[source, cypher]
234
209
----
@@ -251,7 +226,7 @@ neo4j@system> SHOW DATABASE foo;
251
226
====
252
227
A `quarantined` state is persisted for user databases.
253
228
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.
255
230
256
231
The one exception to this rule is for the built-in `system` database.
257
232
Any quarantine for that database is removed automatically after instance restart.
0 commit comments