【 TiDB 使用环境】生产环境
【 TiDB 版本】8.1.1
【复现路径】做过哪些操作出现的问题
程序中使用SQL建表,出现如下错误
[conn.go:1160] [“command dispatched failed”] [conn=1975519856] [session_alias=] [connInfo=“id:1975519856, addr:172.18.80.91:44332 status:0, collation:utf8mb4_0900_ai_ci, user:uat_byteplan_demo”] [command=Query] [status=“inTxn:0, autocommit:0”] [sql=“CREATE TABLE If Not Exists auth_byteplandemo_test_b_cache
( id varchar(200) not null UNIQUE, user_group varchar(500) null, result longtext null, created_date timestamp default CURRENT_TIMESTAMP null, KEY lru_cache_index
(created_date
, id
) )”] [txn_mode=PESSIMISTIC] [timestamp=453213241605095434] [err=“[meta:1050]Table ‘Names:uat_byteplan_demo_db\u0000auth_byteplandemo_test_b_cache’ already exists\ngithub.com/pingcap/errors.AddStack\n\t/root/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20240318064555-6bd07397691f/errors.go:178\ngithub.com/pingcap/errors.Trace\n\t/root/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20240318064555-6bd07397691f/juju_adaptor.go:15\ngithub.com/pingcap/tidb/pkg/meta.(*Meta).CheckTableNameNotExists\n\t/workspace/source/tidb/pkg/meta/meta.go:1574\ngithub.com/pingcap/tidb/pkg/ddl.checkTableNotExistsByName\n\t/workspace/source/tidb/pkg/ddl/table.go:1530\ngithub.com/pingcap/tidb/pkg/ddl.createTable\n\t/workspace/source/tidb/pkg/ddl/table.go:63\ngithub.com/pingcap/tidb/pkg/ddl.onCreateTable\n\t/workspace/source/tidb/pkg/ddl/table.go:176\ngithub.com/pingcap/tidb/pkg/ddl.(*worker).runDDLJob\n\t/workspace/source/tidb/pkg/ddl/ddl_worker.go:1253\ngithub.com/pingcap/tidb/pkg/ddl.(*worker).HandleLocalDDLJob\n\t/workspace/source/tidb/pkg/ddl/ddl_worker.go:1062\ngithub.com/pingcap/tidb/pkg/ddl.(*ddl).delivery2LocalWorker.func1\n\t/workspace/source/tidb/pkg/ddl/job_table.go:408\ngithub.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).Run.func1\n\t/workspace/source/tidb/pkg/util/wait_group_wrapper.go:157\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1197”
【遇到的问题:问题现象及影响】
建表报错,正常来说,表存在的情况下,应该是不报错的,这次出现了报错,目前无法复现,再次反复执行,就是不报错的
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【附件:截图/日志/监控】