From 1fa784434f7cfb7d6186b00f3c0386bb2d06ce5c Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Tue, 21 Jul 2026 04:29:28 +0000 Subject: [PATCH] =?UTF-8?q?feat(controller):=20clusterconfig-schema-split?= =?UTF-8?q?=20task=202.3=20=E2=80=94=20remove=20dead=20port=20defaulting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes SET_DEFAULT_IF_UNSET(c->port, 0, 9990) from fill_default_cluster_config() in myconf.c and config_repl.c, now dead since cluster_config_t.port was removed in task 1.2 and cluster_open_listener stopped reading it in task 2.1. All of src/controller/{cluster,myconf,config_repl}.c now compile clean. --- .kiro/specs/clusterconfig-schema-split/tasks.md | 2 +- src/controller/config_repl.c | 1 - src/controller/myconf.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.kiro/specs/clusterconfig-schema-split/tasks.md b/.kiro/specs/clusterconfig-schema-split/tasks.md index 3027500..fc76eda 100644 --- a/.kiro/specs/clusterconfig-schema-split/tasks.md +++ b/.kiro/specs/clusterconfig-schema-split/tasks.md @@ -45,7 +45,7 @@ - _Depends: 1.2_ - _Boundary: Debug-Dump Component (cluster.c)_ -- [ ] 2.3 Remove the now-dead `ClusterConfig` port defaulting in `myconf.c` and `config_repl.c` +- [x] 2.3 Remove the now-dead `ClusterConfig` port defaulting in `myconf.c` and `config_repl.c` - Delete the `SET_DEFAULT_IF_UNSET(c->port, 0, 9990)` call in `myconf.c` - Delete the equivalent `SET_DEFAULT_IF_UNSET(c->port, 0, 9990)` call in `config_repl.c` - Observable: `myconf.c` and `config_repl.c` compile without referencing `cluster_config_t`'s `port` member diff --git a/src/controller/config_repl.c b/src/controller/config_repl.c index 728b538..3b04d62 100644 --- a/src/controller/config_repl.c +++ b/src/controller/config_repl.c @@ -584,7 +584,6 @@ static void *s_probe_ssl_ctx = NULL; static void fill_default_cluster_config(cluster_config_t *c) { - SET_DEFAULT_IF_UNSET(c->port, 0, 9990); SET_DEFAULT_IF_UNSET(c->heartbeat_interval, 0, 5); SET_DEFAULT_IF_UNSET(c->fetch_job_interval, 0, 10); } diff --git a/src/controller/myconf.c b/src/controller/myconf.c index 907255f..19079f8 100644 --- a/src/controller/myconf.c +++ b/src/controller/myconf.c @@ -71,7 +71,6 @@ static int cluster_hook_fun(int type, int situation, int detail, void* data, static void fill_default_cluster_config(cluster_config_t* c) { - SET_DEFAULT_IF_UNSET(c->port, 0, 9990); SET_DEFAULT_IF_UNSET(c->heartbeat_interval, 0, 5); SET_DEFAULT_IF_UNSET(c->fetch_job_interval, 0, 10); }