From 246c13556900358730353c282d8543b83e1bd900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Ckeyu813=E2=80=9D?= <“1121848065@qq.com”> Date: Sat, 5 Mar 2022 09:00:30 +0800 Subject: [PATCH] update --- src/sdk/mini_cluster.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/sdk/mini_cluster.h b/src/sdk/mini_cluster.h index 0824aacea90..194c70a3a5d 100644 --- a/src/sdk/mini_cluster.h +++ b/src/sdk/mini_cluster.h @@ -69,20 +69,13 @@ class MiniCluster { if (tablet_num > MAX_TABLET_NUM) { return false; } - zk_path_ = "/mini_cluster_" + GenRand(); FLAGS_system_table_replica_num = 1; srand(time(NULL)); FLAGS_db_root_path = "/tmp/mini_cluster" + GenRand(); zk_cluster_ = "127.0.0.1:" + std::to_string(zk_port_); FLAGS_zk_cluster = zk_cluster_; - tablet_num_ = tablet_num; - for (int i = 0; i < tablet_num; i++) { - if (!StartTablet(&tb_servers_[i])) { - LOG(WARNING) << "fail to start tablet"; - return false; - } - } std::string ns_endpoint = "127.0.0.1:" + GenRand(); + zk_path_ = "/mini_cluster_" + GenRand(); sleep(1); LOG(INFO) << "zk cluster " << zk_cluster_ << " zk path " << zk_path_ << " enable_distsql = " << FLAGS_enable_distsql;