Join GitHub today
domain: fast new a etcd session when the session is stale in the schemaVersionSyncer #7774
Fix issue that when the pd leader is down, the etcd session will be stale, and tidb may costs several minutes to create a new session to the etcd in some case.
I have done a manual test using ansible, with inventory.ini:
There are 2 pd, 1 tidb, 1 tikv in the test cluster, I start a client which continue inserting data into tidb, and I kill -9 the pd leader, we can see the tidb report errors:
After the pd recover:
It costs several millseconds to recover.