DDL notifier does not guarantee delivery when internal SQL failed to COMMIT #59055
Labels
affects-8.5
This bug affects the 8.5.x(LTS) versions.
component/ddl
This issue is related to DDL of TiDB.
severity/major
type/bug
The issue is confirmed as a bug.
Bug Report
tidb/pkg/ddl/notifier/subscribe.go
Lines 275 to 296 in c34a6b6
If
handler
runs without error, DDL notifier marks the in-memory structurechange
as processed in line 295. However thehandler
may still fail in line 277 when commits. Thechange
uses the same SQL transaction so the wrong processed state is not persisted, but the memory state ofchange
is used afterward and causes problemstidb/pkg/ddl/notifier/subscribe.go
Lines 233 to 244 in c34a6b6
1. Minimal reproduce step (Required)
Will add UT in fix PR
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: