Open lcwangchao opened 1 month ago
Can you explain more about the purpose?
I opened this PR
Can you explain more about the purpose?
Added some explanations. However, PR #56728 only tests how much we can accelerate the unit test.
I also found https://github.com/pingcap/tidb/issues/42434 but it's reverted somehow.
Enhancement
Many unit tests are using testkit.CreateMockStore or testkit.CreateMockStoreAndDomain to create a new mock TiDB cluster for the following cases. The above methods wrap up the bootstrap procedure that creates all the system tables using DDL. Normally, DDL operations will dispatch the job to the owner and then await the owner's response. Together with other mechanisms such as MDL or infoschema syncing , it is much slower than just writing key/values to the KV layer. A natural thought is that writing the meta to the KV layer directly without the complex DDL process may accelerate the tests. We have reasons why DDL is not necessary when bootstrapping: