Skip to content

Commit 45cc796

Browse files
Add a caution about REALLOCATE DATABASES moving too much (#1762)
If there are lots of databases to move, an unbounded REALLOCATE can be stressful for the cluster and the databases involved. With the newly public limited reallocate procedures, they provide a gentler way to achieve the balancing incrementally.
1 parent 373754f commit 45cc796

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/ROOT/pages/clustering/databases.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ To rebalance all database allocations across the cluster, for example, because y
166166
[[reallocate-databases-procedure]]
167167
=== Reallocate databases using a procedure
168168

169-
You can use the procedure xref:reference/procedures.adoc#procedure_dbms_cluster_reallocateDatabase[`dbms.cluster.reallocateDatabase()`] to offload a specific database from all servers containing it onto new servers or xref:reference/procedures.adoc#procedure_dbms_cluster_reallocateNumberOfDatabases[dbms.cluster.reallocateNumberOfDatabases] to rebalance all database allocations across the cluster and relieve overloaded servers.
169+
You can use the procedure xref:reference/procedures.adoc#procedure_dbms_cluster_reallocateDatabase[`dbms.cluster.reallocateDatabase`] to rebalance a specific database across the cluster, or xref:reference/procedures.adoc#procedure_dbms_cluster_reallocateNumberOfDatabases[`dbms.cluster.reallocateNumberOfDatabases`] to rebalance a number of database allocations across the cluster and relieve overloaded servers.
170+
Note that if the cluster is already balanced, no reallocations will happen when running these procedures.
170171
These procedures do not require a server name and can be executed with or without a dry run.
171172

172173
[NOTE]
@@ -202,6 +203,12 @@ neo4j@system> CALL dbms.cluster.reallocateNumberOfDatabases(3);
202203
You can use the Cypher command `REALLOCATE DATABASES` to rebalance all database allocations across the cluster and relieve overloaded servers.
203204
This command can also be used with `DRYRUN` to preview the new allocation of databases.
204205

206+
[CAUTION]
207+
====
208+
`REALLOCATE DATABASES` on a large cluster with many databases has the potential to move a lot of allocations at once, which might stress the cluster.
209+
Consider starting with more limited reallocations, such as xref:reference/procedures.adoc#procedure_dbms_cluster_reallocateNumberOfDatabases[`dbms.cluster.reallocateNumberOfDatabases`] with a small number, and let the databases complete their reallocation before calling it again, until no more reallocations are necessary.
210+
====
211+
205212
[NOTE]
206213
====
207214
`DRYRUN` is available from Neo4j 5.2 and later.

0 commit comments

Comments
 (0)