diff --git a/.kiro/specs/clusterconfig-schema-split/tasks.md b/.kiro/specs/clusterconfig-schema-split/tasks.md index d96e74d0..30275009 100644 --- a/.kiro/specs/clusterconfig-schema-split/tasks.md +++ b/.kiro/specs/clusterconfig-schema-split/tasks.md @@ -37,7 +37,7 @@ - _Depends: 1.2_ - _Boundary: Listener/Port-Resolution Component (cluster.c)_ -- [ ] 2.2 Remove the `candidates` debug-dump mirror +- [x] 2.2 Remove the `candidates` debug-dump mirror - Delete the `candidates`/`ncandidates` KV-mirror loop from `cluster_build_config` - Confirm `init_controller_tunables()` itself is left unchanged — the hardcoded tunable constants and their consumption are untouched by this spec - Observable: `cluster_build_config` compiles without referencing `candidates` or `ncandidates`; the controller's internal debug/status config dump no longer includes those keys diff --git a/src/controller/cluster.c b/src/controller/cluster.c index a01526c2..1ea462bc 100644 --- a/src/controller/cluster.c +++ b/src/controller/cluster.c @@ -851,7 +851,6 @@ static void endpoint_killer(void* p) int cluster_build_config(cluster_t* c) { char valbuf[128]; - int i; snprintf(valbuf, sizeof(valbuf) - 1, "%d", c->myconf->cluster_config->heartbeat_interval); @@ -859,27 +858,6 @@ int cluster_build_config(cluster_t* c) snprintf(valbuf, sizeof(valbuf) - 1, "%d", c->myconf->cluster_config->inactive_heartbeat_count); add_config(c, "inactive_heartbeat_count", valbuf); - snprintf(valbuf, sizeof(valbuf) - 1, "%d", - c->myconf->cluster_config->ncandidates); - add_config(c, "ncandidates", valbuf); - - for (i = 0; i < c->myconf->cluster_config->ncandidates; i++) { - char keybuf[128]; - - sprintf(keybuf, "candidate_%d_name", i); - sprintf(valbuf, "%s", c->myconf->cluster_config->candidates[i]->name); - - add_config(c, keybuf, valbuf); - - sprintf(keybuf, "candidate_%d_host", i); - sprintf(valbuf, "%s", c->myconf->cluster_config->candidates[i]->host); - - add_config(c, keybuf, valbuf); - sprintf(keybuf, "candidate_%d_port", i); - sprintf(valbuf, "%d", c->myconf->cluster_config->candidates[i]->port); - - add_config(c, keybuf, valbuf); - } return 0; }