From 71a7016c30753e92140268d157c32efaed8e656e Mon Sep 17 00:00:00 2001 From: xiepaup Date: Thu, 21 Mar 2024 17:58:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(redis):=20Cache=E5=A2=9E=E5=8A=A032G?= =?UTF-8?q?=E6=96=B9=E6=A1=88=20#3634?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/db_services/dbresource/handlers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dbm-ui/backend/db_services/dbresource/handlers.py b/dbm-ui/backend/db_services/dbresource/handlers.py index d3307e9e73..aecdbeebaf 100644 --- a/dbm-ui/backend/db_services/dbresource/handlers.py +++ b/dbm-ui/backend/db_services/dbresource/handlers.py @@ -208,6 +208,8 @@ def calc_cluster_shard_num(self): avaiable_specs.append(self.specs[spec_cnt - 1]) if spec_cnt > 2: avaiable_specs.append(self.specs[spec_cnt - 2]) + if spec_cnt > 3: + avaiable_specs.append(self.specs[spec_cnt - 3]) for spec_new in avaiable_specs: # 一定要保证集群总分片数是机器组数的整数倍,并且单机分片数需要取整,取偶