Commit 6e69e74
Fix createClusterIfRequired to use controller ZK for controller-cluster ops
In split-ZK mode, the controller cluster (venice-controllers) lives on
controller.cluster.zk.address, not on zookeeper.address. The four
admin.addResource/getResourceIdealState/setResourceIdealState/rebalance
calls in createClusterIfRequired all used admin (storage ZK), causing
'cluster venice-controllers is not setup yet' because that cluster does
not exist on the storage ZK.
Fix: replace those calls with
helixAdminClient.addVeniceStorageClusterToControllerCluster()
which correctly routes to the controller ZK via controllerClusterHelixAdmin.
This is safe in both shared-ZK (no behavioral change, same ZK) and split-ZK
deployments. Also remove now-unused DelayedAutoRebalancer,
CrushRebalanceStrategy
imports and the CONTROLLER_CLUSTER_NUMBER_OF_PARTITION constant.
Also fix TestVeniceControllerZkClientIsolation: change
@BeforeClass/@afterclass
for storageZk and controllerZk to @BeforeMethod/@AfterMethod. The split-ZK
test creates venice-controllers on controllerZk; without per-method ZK
lifecycle, that data leaks into testSharedZkBaseline which then fails its
assertion that controllerZk holds no Venice clusters.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 743975d commit 6e69e74
2 files changed
Lines changed: 8 additions & 27 deletions
File tree
- internal/venice-test-common/src/integrationTest/java/com/linkedin/venice/controller
- services/venice-controller/src/main/java/com/linkedin/venice/controller
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | | - | |
| 38 | + | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
| 76 | + | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 88 | | |
94 | 89 | | |
95 | 90 | | |
| |||
Lines changed: 6 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | 310 | | |
314 | 311 | | |
315 | 312 | | |
| |||
362 | 359 | | |
363 | 360 | | |
364 | 361 | | |
365 | | - | |
366 | 362 | | |
367 | 363 | | |
368 | 364 | | |
| |||
7296 | 7292 | | |
7297 | 7293 | | |
7298 | 7294 | | |
7299 | | - | |
7300 | | - | |
7301 | | - | |
7302 | | - | |
7303 | | - | |
7304 | | - | |
7305 | | - | |
7306 | | - | |
7307 | | - | |
7308 | | - | |
7309 | | - | |
7310 | | - | |
7311 | | - | |
7312 | | - | |
7313 | | - | |
7314 | | - | |
| 7295 | + | |
| 7296 | + | |
| 7297 | + | |
| 7298 | + | |
| 7299 | + | |
| 7300 | + | |
7315 | 7301 | | |
7316 | 7302 | | |
7317 | 7303 | | |
| |||
0 commit comments