-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.impact/upgradereport/customerCustomers have encountered this bug.Customers have encountered this bug.severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- during upgrade, trigger this issue multiple owner might exist at same time if keys are delete manually #54689 on the older node
A
- during the upgrade there is a
ALTER TABLE mysql.tidb_runaway_queries MODIFY COLUMN
plan_digestvarchar(64) DEFAULT '';
submitted by the 8.5 node which will force to be owner, and the job is using v1 args, but it contains 8 args, below is the code of 8.5.0
tidb/pkg/meta/model/job_args.go
Lines 1690 to 1694 in 244062f
func (a *ModifyColumnArgs) getArgsV1(*Job) []any { return []any{ a.Column, a.OldColumnName, a.Position, a.ModifyColumnType, a.NewShardBits, a.ChangingColumn, a.ChangingIdxs, a.RedundantIdxs, } - if the job is run on
A
, it will append args, but A only uses the first 8, the appended args is useless.- if the job is created by older version, the job will only have 5 args initially, will append args will work, below is the code of 8.1.0
Line 6027 in 945d07c
Args: []any{&newCol.ColumnInfo, originalColName, spec.Position, modifyColumnTp, newAutoRandBits},
- if the job is created by older version, the job will only have 5 args initially, will append args will work, below is the code of 8.1.0
- so
modifyInfo.changingCol
is nil all the time, and it's initialized and inserted into the tableinfo every time(code of 8.1.0):
Lines 570 to 571 in 945d07c
changingCol := modifyInfo.changingCol if changingCol == nil { - as node
A
keeps running the job, we got a tableinfo like this:
{
"id": 432102,
"name": {
"O": "tidb_runaway_queries",
"L": "tidb_runaway_queries"
},
"charset": "utf8mb4",
"collate": "utf8mb4_bin",
"cols": [
..... other columns
{
"id": 3546,
"name": {
"O": "_Col$_plan_digest_3536",
"L": "_col$_plan_digest_3536"
},
"offset": 3545,
.....
}
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
see title
Metadata
Metadata
Assignees
Labels
affects-8.5This bug affects the 8.5.x(LTS) versions.This bug affects the 8.5.x(LTS) versions.component/ddlThis issue is related to DDL of TiDB.This issue is related to DDL of TiDB.impact/upgradereport/customerCustomers have encountered this bug.Customers have encountered this bug.severity/majortype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.