ddl stucks and keeps printing "syncer check all versions, someone is not synced" even though the job have already synced #57003
Labels
affects-6.5
affects-7.1
affects-7.5
affects-8.1
component/ddl
This issue is related to DDL of TiDB.
severity/moderate
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
timeline:
the reason is in older version TiDB, DDL scheduler loop doesn't cancel and exit, it keeps running even after it's not the owner anymore. it's detects whether it's the new owner inside the loop, so once it starts schedule jobs it won't return until it finished one job step
tidb/pkg/ddl/job_table.go
Lines 279 to 284 in a7df4f9
marked as moderate as it's a corner case that's hard to reproduce in real world. I found it during upgrade to current master where we will force new node to be the owner, so there will be a owner change and have more chance to trigger this bug.
since v8.2.0, we have refactor this part to cancel the scheduler loop on retire owner, so no such issue
tidb/pkg/ddl/job_table.go
Lines 176 to 177 in 821e491
2. What did you expect to see? (Required)
no stuck
3. What did you see instead (Required)
ddl stucks and keeps printing "syncer check all versions, someone is not synced"
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: