@@ -120,6 +120,7 @@ type (
120120 ServerConfigs struct {
121121 TiDB map [string ]any `yaml:"tidb"`
122122 TiKV map [string ]any `yaml:"tikv"`
123+ TiKVWorker map [string ]any `yaml:"tikv_worker"`
123124 PD map [string ]any `yaml:"pd"`
124125 TSO map [string ]any `yaml:"tso"`
125126 Scheduling map [string ]any `yaml:"scheduling"`
@@ -140,6 +141,7 @@ type (
140141 ComponentVersions struct {
141142 TiDB string `yaml:"tidb,omitempty"`
142143 TiKV string `yaml:"tikv,omitempty"`
144+ TiKVWorker string `yaml:"tikv_worker,omitempty"`
143145 TiFlash string `yaml:"tiflash,omitempty"`
144146 PD string `yaml:"pd,omitempty"`
145147 TSO string `yaml:"tso,omitempty"`
@@ -162,15 +164,16 @@ type (
162164
163165 // ComponentSources represents the source of components
164166 ComponentSources struct {
165- TiDB string `yaml:"tidb,omitempty" validate:"tidb:editable"`
166- TiKV string `yaml:"tikv,omitempty" validate:"tikv:editable"`
167- TiFlash string `yaml:"tiflash,omitempty" validate:"tiflash:editable"`
168- PD string `yaml:"pd,omitempty" validate:"pd:editable"`
169- Dashboard string `yaml:"tidb_dashboard,omitempty" validate:"tidb_dashboard:editable"`
170- Pump string `yaml:"pump,omitempty" validate:"pump:editable"`
171- Drainer string `yaml:"drainer,omitempty" validate:"drainer:editable"`
172- CDC string `yaml:"cdc,omitempty" validate:"cdc:editable"`
173- TiKVCDC string `yaml:"kvcdc,omitempty" validate:"kvcdc:editable"`
167+ TiDB string `yaml:"tidb,omitempty" validate:"tidb:editable"`
168+ TiKV string `yaml:"tikv,omitempty" validate:"tikv:editable"`
169+ TiKVWorker string `yaml:"tikv_worker,omitempty" validate:"tikv_worker:editable"`
170+ TiFlash string `yaml:"tiflash,omitempty" validate:"tiflash:editable"`
171+ PD string `yaml:"pd,omitempty" validate:"pd:editable"`
172+ Dashboard string `yaml:"tidb_dashboard,omitempty" validate:"tidb_dashboard:editable"`
173+ Pump string `yaml:"pump,omitempty" validate:"pump:editable"`
174+ Drainer string `yaml:"drainer,omitempty" validate:"drainer:editable"`
175+ CDC string `yaml:"cdc,omitempty" validate:"cdc:editable"`
176+ TiKVCDC string `yaml:"kvcdc,omitempty" validate:"kvcdc:editable"`
174177 }
175178
176179 // Specification represents the specification of topology.yaml
@@ -182,6 +185,7 @@ type (
182185 ServerConfigs ServerConfigs `yaml:"server_configs,omitempty" validate:"server_configs:ignore"`
183186 TiDBServers []* TiDBSpec `yaml:"tidb_servers"`
184187 TiKVServers []* TiKVSpec `yaml:"tikv_servers"`
188+ TiKVWorkerServers []* TiKVWorkerSpec `yaml:"tikv_worker_servers,omitempty"`
185189 TiFlashServers []* TiFlashSpec `yaml:"tiflash_servers"`
186190 TiProxyServers []* TiProxySpec `yaml:"tiproxy_servers"`
187191 PDServers []* PDSpec `yaml:"pd_servers"`
@@ -570,6 +574,7 @@ func (s *Specification) Merge(that Topology) Topology {
570574 ComponentVersions : s .ComponentVersions .Merge (spec .ComponentVersions ),
571575 TiDBServers : append (s .TiDBServers , spec .TiDBServers ... ),
572576 TiKVServers : append (s .TiKVServers , spec .TiKVServers ... ),
577+ TiKVWorkerServers : append (s .TiKVWorkerServers , spec .TiKVWorkerServers ... ),
573578 PDServers : append (s .PDServers , spec .PDServers ... ),
574579 DashboardServers : append (s .DashboardServers , spec .DashboardServers ... ),
575580 TiFlashServers : append (s .TiFlashServers , spec .TiFlashServers ... ),
@@ -595,6 +600,7 @@ func (v *ComponentVersions) Merge(that ComponentVersions) ComponentVersions {
595600 return ComponentVersions {
596601 TiDB : utils .Ternary (that .TiDB != "" , that .TiDB , v .TiDB ).(string ),
597602 TiKV : utils .Ternary (that .TiKV != "" , that .TiKV , v .TiKV ).(string ),
603+ TiKVWorker : utils .Ternary (that .TiKVWorker != "" , that .TiKVWorker , v .TiKVWorker ).(string ),
598604 PD : utils .Ternary (that .PD != "" , that .PD , v .PD ).(string ),
599605 TSO : utils .Ternary (that .TSO != "" , that .TSO , v .TSO ).(string ),
600606 Scheduling : utils .Ternary (that .Scheduling != "" , that .Scheduling , v .Scheduling ).(string ),
@@ -812,7 +818,7 @@ func (s *Specification) ComponentsByStopOrder() (comps []Component) {
812818
813819// ComponentsByStartOrder return component in the order need to start.
814820func (s * Specification ) ComponentsByStartOrder () (comps []Component ) {
815- // "pd", "tso", "scheduling", "resource-manager", "dashboard", "tiproxy", "tikv", "pump", "tidb", "tiflash", "drainer", "cdc", "tikv-cdc", "prometheus", "grafana", "alertmanager"
821+ // "pd", "tso", "scheduling", "resource-manager", "dashboard", "tiproxy", "tikv", "tikv-worker", " pump", "tidb", "tiflash", "drainer", "cdc", "tikv-cdc", "prometheus", "grafana", "alertmanager"
816822 comps = append (comps , & PDComponent {s })
817823 comps = append (comps , & TSOComponent {s })
818824 comps = append (comps , & SchedulingComponent {s })
@@ -821,6 +827,7 @@ func (s *Specification) ComponentsByStartOrder() (comps []Component) {
821827 comps = append (comps , & DashboardComponent {s })
822828 comps = append (comps , & TiProxyComponent {s })
823829 comps = append (comps , & TiKVComponent {s })
830+ comps = append (comps , & TiKVWorkerComponent {s })
824831 comps = append (comps , & PumpComponent {s })
825832 comps = append (comps , & TiDBComponent {s })
826833 comps = append (comps , & TiFlashComponent {s })
@@ -840,7 +847,7 @@ func (s *Specification) ComponentsByUpdateOrder(curVer string) (comps []Componen
840847 // Ref: https://github.com/pingcap/tiup/issues/2166
841848 cdcUpgradeBeforePDTiKVTiDB := tidbver .TiCDCUpgradeBeforePDTiKVTiDB (curVer )
842849
843- // "tiflash", <"cdc">, "pd", "tso", "scheduling", "resource-manager","router", "dashboard", "tiproxy", "tikv", "pump", "tidb", "drainer", <"cdc>", "prometheus", "grafana", "alertmanager"
850+ // "tiflash", <"cdc">, "pd", "tso", "scheduling", "resource-manager","router", "dashboard", "tiproxy", "tikv", "tikv-worker", " pump", "tidb", "drainer", <"cdc>", "prometheus", "grafana", "alertmanager"
844851 comps = append (comps , & TiFlashComponent {s })
845852 if cdcUpgradeBeforePDTiKVTiDB {
846853 comps = append (comps , & CDCComponent {s })
@@ -853,6 +860,7 @@ func (s *Specification) ComponentsByUpdateOrder(curVer string) (comps []Componen
853860 comps = append (comps , & DashboardComponent {s })
854861 comps = append (comps , & TiProxyComponent {s })
855862 comps = append (comps , & TiKVComponent {s })
863+ comps = append (comps , & TiKVWorkerComponent {s })
856864 comps = append (comps , & PumpComponent {s })
857865 comps = append (comps , & TiDBComponent {s })
858866 comps = append (comps , & DrainerComponent {s })
0 commit comments