Skip to content

Commit 2605f58

Browse files
committed
fix(tidb): fix set labels of tidb
Signed-off-by: liubo02 <liubo02@pingcap.com>
1 parent 8b847c4 commit 2605f58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/controllers/tidb/builder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ func (r *Reconciler) NewRunner(state *tasks.ReconcileContext, reporter task.Task
8181
if err != nil {
8282
return err
8383
}
84-
if reflect.DeepEqual(info.Labels, labels) {
85-
return state.TiDBClient.SetServerLabels(ctx, info.Labels)
84+
if !reflect.DeepEqual(info.Labels, labels) {
85+
return state.TiDBClient.SetServerLabels(ctx, labels)
8686
}
8787

8888
return nil

0 commit comments

Comments
 (0)