pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/
https://pingcap.com
Apache License 2.0
37.04k stars 5.82k forks source link

[FATAL] [bootstrap.go:1703] ["doReentrantDDL error"] [error="[schema:1054]Unknown column 'time' in 'tidb_runaway_queries'"] #56574

Open apollodafoni opened 3 hours ago

apollodafoni commented 3 hours ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

When there were a large number of DDL jobs, use tiup upgrade failed. TiDB was down during upgrade!

tiup.yaml is as follows:

global:
  arch: amd64
  user: "tidb"
  ssh_port: 22
  deploy_dir: "/tiup/deploy"
  data_dir: "/tiup/data"
  enable_tls: false
server_configs:
  pd: {}
  tidb: {}
  tikv: {}
pd_servers:
  - host: pd-1-peer
  - host: pd-2-peer
  - host: pd-3-peer
tidb_servers:
  - host: tidb-1-peer
  - host: tidb-2-peer
  - host: tidb-3-peer
tikv_servers:
  - host: tikv-1-peer
  - host: tikv-2-peer
  - host: tikv-3-peer
monitoring_servers:
  - host: tiup-peer
    ng_port: 12020
grafana_servers:
  - host: tiup-peer
alertmanager_servers:
  - host: tiup-peer
tiup cluster deploy ddl_upgrade v8.0.0 tiup.yaml --format json -y
tiup cluster start ddl_upgrade --format json -y
sysbench oltp_common --mysql-port=3390 --mysql-user=root --mysql-db=sbtest2 --time=600 --threads=300 --report-interval=10 --db-driver=mysql --tables=100000 --table-size=10 --create_secondary=false prepare
tiup cluster upgrade ddl_upgrade nightly
admin show ddl jobs 1000 where state = 'paused';

2. What did you expect to see? (Required)

upgrade success

3. What did you see instead (Required)

[2024/10/11 15:05:07.755 +08:00] [WARN] [session.go:2165] ["run statement failed"] [schemaVersion=4280] [error="[schema:1054]Unknown column 'time' in 'tidb_runaway_queries'"] [session="{\n  \"currDBName\": \"\",\n  \"id\": 0,\n  \"status\": 2,\n  \"strictMode\": false,\n  \"user\": null\n}"]
[2024/10/11 15:05:07.755 +08:00] [FATAL] [bootstrap.go:1703] ["doReentrantDDL error"] [error="[schema:1054]Unknown column 'time' in 'tidb_runaway_queries'"] [stack="github.com/pingcap/tidb/pkg/session.doReentrantDDL\n\t/workspace/source/tidb/pkg/session/bootstrap.go:1703\ngithub.com/pingcap/tidb/pkg/session.upgradeToVer212\n\t/workspace/source/tidb/pkg/session/bootstrap.go:3223\ngithub.com/pingcap/tidb/pkg/session.upgrade\n\t/workspace/source/tidb/pkg/session/bootstrap.go:1553\ngithub.com/pingcap/tidb/pkg/session.runInBootstrapSession\n\t/workspace/source/tidb/pkg/session/session.go:3686\ngithub.com/pingcap/tidb/pkg/session.bootstrapSessionImpl\n\t/workspace/source/tidb/pkg/session/session.go:3449\ngithub.com/pingcap/tidb/pkg/session.BootstrapSession\n\t/workspace/source/tidb/pkg/session/session.go:3397\nmain.createStoreAndDomain\n\t/workspace/source/tidb/cmd/tidb-server/main.go:414\nmain.main\n\t/workspace/source/tidb/cmd/tidb-server/main.go:320\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:272"]

4. What is your TiDB version? (Required)

use tiup upgrade tidb from v8.0.0 to nightly version

apollodafoni commented 3 hours ago

/assign @tangenta /severity critical /label affects-8.4