@@ -243,19 +243,22 @@ struct TiFlashProxyConfig
243
243
args_map[" advertise-engine-addr" ] = args_map[" engine-addr" ];
244
244
args_map[" engine-label" ] = getProxyLabelByDisaggregatedMode (disaggregated_mode);
245
245
// For tiflash write node, it should report a extra label with "key" == "engine-role-label"
246
+ String extra_label;
246
247
if (disaggregated_mode == DisaggregatedMode::Storage)
247
- args_map[" engine-role-label" ] = DISAGGREGATED_MODE_WRITE_ENGINE_ROLE;
248
+ {
249
+ extra_label = fmt::format (" engine-role={}" , DISAGGREGATED_MODE_WRITE_ENGINE_ROLE);
250
+ }
248
251
else if (disaggregated_mode == DisaggregatedMode::Compute)
249
252
{
250
253
// For compute node, explicitly add a label with `exclusive=no-data` to avoid Region
251
254
// being placed to the compute node.
252
255
// Related logic in pd-server:
253
256
// https://github.com/tikv/pd/blob/v8.5.0/pkg/schedule/placement/label_constraint.go#L69-L95
254
- String new_labels = " exclusive=no-data" ;
255
- if (args_map.contains (" labels" ))
256
- new_labels = fmt::format (" {},{}" , args_map[" labels" ], new_labels);
257
- args_map[" labels" ] = new_labels;
257
+ extra_label = " exclusive=no-data" ;
258
258
}
259
+ if (args_map.contains (" labels" ))
260
+ extra_label = fmt::format (" {},{}" , args_map[" labels" ], extra_label);
261
+ args_map[" labels" ] = extra_label;
259
262
260
263
#if SERVERLESS_PROXY == 1
261
264
if (config.has (" blacklist_file" ))
0 commit comments