pingcap/tidb-operator

minReadySeconds does not work for the last upgrade tikv

Closed this issue · 5 comments

Bug Report

What version of Kubernetes are you using?
1.16

What version of TiDB Operator are you using?
1.3.8+

What storage classes exist in the Kubernetes cluster and what are used for PD/TiKV pods?
does not matter

What's the status of the TiDB cluster pods?
does not matter

What did you do?
trigger an upgrade for tikv with annotation "annoKeyTiDBMinReadySeconds" annoKeyTiKVMinReadySeconds configured

What did you expect to see?
for the last tikv, it should still wait annoKeyTiDBMinReadySeconds annoKeyTiKVMinReadySeconds before evict-leader-scheduler deleted

What did you see instead?
once the last tikv ready (as a pod), the evict-leader-scheduler for it got deleted, then the last tikv start to receive region leaders.

The just started tikv might have something to do, for example replay log or other else.
If these inner work is heavy, it may be not suitable for tikv to receive region leaders at once.
I think this might be an usage for "annoKeyTiDBMinReadySeconds" annoKeyTiKVMinReadySeconds, but it does not work for the last upgrade tikv.

I would like to help fix it if necessary.

@wangz1x annoKeyTiDBMinReadySeconds is only used for TiDB as some LB controller needs some time to add a Pod as a target.

Do you want to add something like annoKeyTiKVMinReadySeconds for TiKV? that's welcome.

Sorry for my typo. Actually I means annoKeyTiKVMinReadySeconds rather than annoKeyTiDBMinReadySeconds.

I want to make the last TiKV also wait annoKeyTiKVMinReadySeconds before region leaders can transfer to it.

I want to make the last TiKV also wait annoKeyTiKVMinReadySeconds before region leaders can transfer to it.

LGTM 👍