From 91b24ee68faeb90602b8761123303faa2aa27f0e Mon Sep 17 00:00:00 2001 From: lilinghai Date: Wed, 9 Nov 2022 18:04:12 +0800 Subject: [PATCH 1/2] component/playground: rm the restriction that tikv num must be greater than 0 Signed-off-by: lilinghai --- components/playground/playground.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/playground/playground.go b/components/playground/playground.go index 4bcce7e807..2925d0ea72 100644 --- a/components/playground/playground.go +++ b/components/playground/playground.go @@ -814,7 +814,8 @@ func (p *Playground) bootCluster(ctx context.Context, env *environment.Environme p.bootOptions = options - if options.PD.Num < 1 || options.TiKV.Num < 1 { + // All others components depend on the pd, we just ensure the pd count must be great than 0 + if options.PD.Num < 1 { return fmt.Errorf("all components count must be great than 0 (tikv=%v, pd=%v)", options.TiKV.Num, options.PD.Num) } From 1951e966d0ca60ddf81ea8dd5823afbe577a99b3 Mon Sep 17 00:00:00 2001 From: lilinghai Date: Wed, 9 Nov 2022 18:04:12 +0800 Subject: [PATCH 2/2] component/playground: rm the restriction that tikv num must be greater than 0 Signed-off-by: lilinghai --- components/playground/playground.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/playground/playground.go b/components/playground/playground.go index 4bcce7e807..d14985b7f5 100644 --- a/components/playground/playground.go +++ b/components/playground/playground.go @@ -814,8 +814,9 @@ func (p *Playground) bootCluster(ctx context.Context, env *environment.Environme p.bootOptions = options - if options.PD.Num < 1 || options.TiKV.Num < 1 { - return fmt.Errorf("all components count must be great than 0 (tikv=%v, pd=%v)", options.TiKV.Num, options.PD.Num) + // All others components depend on the pd, we just ensure the pd count must be great than 0 + if options.PD.Num < 1 { + return fmt.Errorf("all components count must be great than 0 (pd=%v)", options.PD.Num) } if !utils.Version(options.Version).IsNightly() {