feat(controller): clusterconfig-schema-split task 2.2 — remove candidates debug-dump mirror
Deletes the dead candidates/ncandidates KV-mirror loop from cluster_build_config; init_controller_tunables() left untouched (it only ever read hardcoded constants). cluster.c now compiles clean.
This commit is contained in:
parent
8f047d93d9
commit
81fecb497c
2 changed files with 1 additions and 23 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue