-
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.feature/developingthe related feature is in developmentthe related feature is in developmentseverity/minortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- Enable info schema cache V2 by setting DefTiDBSchemaCacheSize to 10.
- Add
tk.MustExec(`drop view sys.schema_unused_indexes;`)
to the last of the test TestTimeBoundedStalenessTxn
3. Test TestTimeBoundedStalenessTxn and check log.
2. What did you expect to see? (Required)
Partial reload for drop view sys.schema_unused_indexes
3. What did you see instead (Required)
[2024/05/21 16:14:36.358 +08:00] [INFO] [ddl.go:1182] ["start DDL job"] [category=ddl] [job="ID:106, Type:drop view, State:queueing, SchemaState:public, SchemaID:100, TableID:102, RowCount:0, ArgLen:0, start time: 2024-05-21 16:14:36.357 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0, LocalMode: false"] [query="drop view sys.schema_unused_indexes;"]
[2024/05/21 16:14:36.359 +08:00] [INFO] [ddl_worker.go:1212] ["run DDL job"] [worker="worker 4, tp general"] [category=ddl] [jobID=106] [conn=1] [category=ddl] [job="ID:106, Type:drop view, State:queueing, SchemaState:public, SchemaID:100, TableID:102, RowCount:0, ArgLen:0, start time: 2024-05-21 16:14:36.357 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0, LocalMode: false"]
[2024/05/21 16:14:36.360 +08:00] [ERROR] [domain.go:364] ["failed to load schema diff"] [error="[schema:1049]Unknown database '(Schema ID 100)'"] [errorVerbose="[schema:1049]Unknown database '(Schema ID 100)'\ngithub.com/pingcap/errors.AddStack\n\t/Users/bba/.gvm/pkgsets/go1.21.0/global/pkg/mod/github.com/pingcap/[email protected]/errors.go:178\ngithub.com/pingcap/errors.(*Error).GenWithStackByArgs\n\t/Users/bba/.gvm/pkgsets/go1.21.0/global/pkg/mod/github.com/pingcap/[email protected]/normalize.go:175\ngithub.com/pingcap/tidb/pkg/infoschema.(*Builder).applyTableUpdateV2\n\t/Users/bba/pc/tidb/pkg/infoschema/infoschema_v2.go:815\ngithub.com/pingcap/tidb/pkg/infoschema.applyTableUpdate\n\t/Users/bba/pc/tidb/pkg/infoschema/infoschema_v2.go:714\ngithub.com/pingcap/tidb/pkg/infoschema.applyDefaultAction\n\t/Users/bba/pc/tidb/pkg/infoschema/builder.go:315\ngithub.com/pingcap/tidb/pkg/infoschema.(*Builder).ApplyDiff\n\t/Users/bba/pc/tidb/pkg/infoschema/builder.go:102\ngithub.com/pingcap/tidb/pkg/domain.(*Domain).tryLoadSchemaDiffs\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:544\ngithub.com/pingcap/tidb/pkg/domain.(*Domain).loadInfoSchema\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:349\ngithub.com/pingcap/tidb/pkg/domain.(*Domain).Reload\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:679\ngithub.com/pingcap/tidb/pkg/domain.(*Domain).loadSchemaInLoop\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:992\ngithub.com/pingcap/tidb/pkg/domain.(*Domain).Init.func2\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:1360\ngithub.com/pingcap/tidb/pkg/util.(*WaitGroupEnhancedWrapper).Run.func1\n\t/Users/bba/pc/tidb/pkg/util/wait_group_wrapper.go:99\nruntime.goexit\n\t/Users/bba/.gvm/gos/go1.21.0/src/runtime/asm_arm64.s:1197"] [stack="github.com/pingcap/tidb/pkg/domain.(*Domain).loadInfoSchema\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:364\ngithub.com/pingcap/tidb/pkg/domain.(*Domain).Reload\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:679\ngithub.com/pingcap/tidb/pkg/domain.(*Domain).loadSchemaInLoop\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:992\ngithub.com/pingcap/tidb/pkg/domain.(*Domain).Init.func2\n\t/Users/bba/pc/tidb/pkg/domain/domain.go:1360\ngithub.com/pingcap/tidb/pkg/util.(*WaitGroupEnhancedWrapper).Run.func1\n\t/Users/bba/pc/tidb/pkg/util/wait_group_wrapper.go:99"]
[2024/05/21 16:14:36.369 +08:00] [INFO] [domain.go:388] ["full load InfoSchema success"] [currentSchemaVersion=52] [neededSchemaVersion=53] ["start time"=9.231875ms]
4. What is your TiDB version? (Required)
master
Metadata
Metadata
Assignees
Labels
component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.feature/developingthe related feature is in developmentthe related feature is in developmentseverity/minortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.type/regression