Commit 45c6bbd
authored
Allow balancing weights to be set per tier (elastic#126091)
Instead of assuming the BalancedShardsAllocator applies to the entire cluster, I've added the concept of "partitions" into the balancing. The partitions must be mutually disjoint subsets of the shards and nodes - i.e. the set of shards in a partition are only ever allocated to the set of nodes in the same partition, as is the case in serverless. WeightFunctions and NodeSorters are scoped to partitions. a BalancingWeights implementation knows how to partition a cluster.
The status quo behaviour is defined by the GlobalBalancingWeightsFactory, it produces a single global partition.1 parent 9772b5e commit 45c6bbd
File tree
12 files changed
+481
-65
lines changed- docs/changelog
- server/src
- main/java/org/elasticsearch
- cluster
- routing/allocation
- allocator
- plugins
- test/java/org/elasticsearch/cluster/routing/allocation
- allocator
- test/framework/src/main/java/org/elasticsearch/cluster
12 files changed
+481
-65
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 34 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
149 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
150 | 160 | | |
151 | 161 | | |
152 | 162 | | |
153 | 163 | | |
| 164 | + | |
154 | 165 | | |
155 | 166 | | |
156 | 167 | | |
| |||
203 | 214 | | |
204 | 215 | | |
205 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
206 | 233 | | |
207 | 234 | | |
208 | 235 | | |
| |||
439 | 466 | | |
440 | 467 | | |
441 | 468 | | |
| 469 | + | |
442 | 470 | | |
443 | 471 | | |
444 | 472 | | |
| |||
448 | 476 | | |
449 | 477 | | |
450 | 478 | | |
451 | | - | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
452 | 483 | | |
453 | 484 | | |
454 | 485 | | |
455 | 486 | | |
456 | | - | |
| 487 | + | |
457 | 488 | | |
458 | 489 | | |
459 | 490 | | |
| |||
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | | - | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 67 | + | |
69 | 68 | | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments