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
Scale: Inform about CrateDB 5.9.0's cluster-wide allocation rules
In CrateDB 5.9.0 or higher, you don't need to change shard allocations for each
individual table any longer. Instead, default allocation rules can be set on
the cluster level:
> [CrateDB 5.9.0] added support to override `routing.allocation.*` cluster
> settings with a `routing.allocation.*` table setting. This can be used to
> define the default routing behavior for all tables with a cluster setting
> and reroute individual tables by assigning the table setting using `ALTER
> TABLE SET`.
Copy file name to clipboardExpand all lines: docs/admin/clustering/scale/demand.md
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -48,15 +48,22 @@ We want to make sure that the addition of the temporary nodes does not result on
48
48
49
49
We will be able to identify the new nodes by using a custom attribute (`node.attr.storage=temporarynodes`) (see further down for details on how to configure this), so the first step is to configure the existing partitions so that they do not consider the new nodes as suitable targets for shard allocation.
50
50
51
-
In CrateDB 5.1.2 or higher we can achieve this with:
52
-
51
+
In CrateDB 5.1.2 or higher, you can achieve this with:
53
52
```sql
54
53
/* this applies the setting to all existing partitions and new partitions */
55
54
ALTERTABLE test SET ("routing.allocation.exclude.storage"='temporarynodes');
56
55
57
56
/* then we run this other command so that the setting does not apply to new partitions */
58
57
ALTERTABLE ONLY test RESET ("routing.allocation.exclude.storage");
59
58
```
59
+
In CrateDB 5.9.0 or higher, you don't need to change shard allocations for each
60
+
individual table any longer. Instead, default allocation rules can be set on
61
+
the cluster level:
62
+
> [CrateDB 5.9.0] added support to override `routing.allocation.*` cluster
63
+
> settings with a `routing.allocation.*` table setting. This can be used to
64
+
> define the default routing behavior for all tables with a cluster setting
65
+
> and reroute individual tables by assigning the table setting using `ALTER
66
+
> TABLE SET`.
60
67
61
68
No data gets reallocated when running this, and there is no impact on querying or ingestion.
62
69
@@ -161,8 +168,7 @@ INSERT INTO test (ts) VALUES ('2022-12-19'), ('2022-12-20');
161
168
162
169
When we are ready to decommission the temporary nodes, we need to move the data collected during the days of the event.
163
170
164
-
In CrateDB 5.1.2 or higher we can achieve this with:
165
-
171
+
In CrateDB 5.1.2 or higher, you can achieve this with:
166
172
```sql
167
173
ALTERTABLE test SET ("routing.allocation.exclude.storage"='temporarynodes');
168
174
ALTERTABLE test RESET ("routing.allocation.total_shards_per_node");
@@ -185,4 +191,5 @@ Once this is done, the machines can safely be shutdown.
185
191
If desired, new nodes can be deployed reusing the same names that were used for the temporary nodes before.
0 commit comments