diff options
| author | root <[email protected]> | 2024-01-03 09:33:19 +0000 |
|---|---|---|
| committer | root <[email protected]> | 2024-01-03 09:33:19 +0000 |
| commit | a12eedd985ca300bb0b4654c4f6b985692984dc8 (patch) | |
| tree | fcd76628977c0817855645d5efd4809dce0d9353 | |
| parent | 56e19600c47233dff58f800b67e8c746f5f94bd1 (diff) | |
TSG-15105: 启动后自动执行cluster sanity heal
| -rw-r--r-- | shaping/src/shaper_swarmkv.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shaping/src/shaper_swarmkv.cpp b/shaping/src/shaper_swarmkv.cpp index 1fea20c..81d8ac9 100644 --- a/shaping/src/shaper_swarmkv.cpp +++ b/shaping/src/shaper_swarmkv.cpp @@ -170,6 +170,10 @@ struct swarmkv* shaper_swarmkv_init(int caller_thread_num) } LOG_DEBUG("%s: shaping open swarmkv: %s", LOG_TAG_SWARMKV, conf.swarmkv_cluster_name); + + char cmd[256] = {0};//重启之后自动执行一次heal + snprintf(cmd, sizeof(cmd), "/opt/tsg/framework/bin/swarmkv-cli -n %s -c %s:%d --exec CLUSTER SANITY heal", conf.swarmkv_cluster_name, conf.swarmkv_consul_ip, conf.swarmkv_consul_port); + system(cmd); return swarmkv_db; } |
