-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.severity/minortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
When I'm developing #58110, I found that after making more than 1000 schema change, all DDL will be blocked.
The following test can be used as a simple reproduce:
func TestCreateAndDropTable(t *testing.T) {
store, dom := testkit.CreateMockStoreAndDomain(t)
tk := testkit.NewTestKit(t, store)
for i := 0; i < 600; i++ {
logutil.BgLogger().Info("round", zap.Int("round", i))
tk.RefreshSession()
tk.MustExec("use test")
tk.MustExec("DROP TABLE if exists t")
tk.MustExec("CREATE TABLE t (id INT PRIMARY KEY, created_at DATETIME) TTL = created_at + INTERVAL 1 HOUR TTL_ENABLE='OFF'")
tbl, err := dom.InfoSchema().TableByName(context.Background(), pmodel.NewCIStr("test"), pmodel.NewCIStr("t"))
require.NoError(t, err)
logutil.BgLogger().Info("create table", zap.Int64("table_id", tbl.Meta().ID))
tk.MustExec("ALTER TABLE t TTL_ENABLE='ON'")
}
}
Metadata
Metadata
Assignees
Labels
component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.severity/minortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.