You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFAIK, TiDB server will clean up the etcd session upon shutdown(either gracefully or not), which release the lock of DDL owner path and trigger a leader election immediately. Therefore, we can remove the resign DDL owner logic and leave it to TiDB server.
Example:
Send SIGTERM (shutdown but not gracefully) to tidb-2, which is the current DDL owner:
➜ ~ kubectl exec -it wuyelei-tidb-2 -c tidb -- sh
/ # kill -s TERM 1
/ # command terminated with exit code 137
Log of tidb-1 and tidb-2 shows that tidb-2 clean up the session and tidb-1 get the owner immediately:
@aylei
If we don't use "kill -9" to kill TiDB server, we will revoke the DDL owner path immediately. So we can remove the resign DDL owner logic in this case.
AFAIK, resigning ddl owner when upgrading is suggested for some corner cases that may not be handled correctly in tidb-server.
There are some bugs that when we don't resign ddl owner the data may be not consistent in early 2.1.x versions. But it's fixed now and hasn't appeared till now. Besides, there's no such operation logic in tidb-ansible. So I think we can remove this logic now.
Feature Request
AFAIK, TiDB server will clean up the etcd session upon shutdown(either gracefully or not), which release the lock of DDL owner path and trigger a leader election immediately. Therefore, we can remove the resign DDL owner logic and leave it to TiDB server.
Example:
cc @tennix @weekface @zimulala
The text was updated successfully, but these errors were encountered: