tiflow
tiflow copied to clipboard
syncpoint(ticdc): set write source before creating SyncTable
What problem does this PR solve?
Issue Number: close #11375
What is changed and how it works?
TiDB in the BDR secondary role forbids all ddl writes. Therefore, SyncTable cannot be created when syncpoint is enabled on the changefeed from the primary to the secondary. This problem can be solved by setting the writesource before executing the create ddl.
Check List
Tests
- Integration test
- Manual test (add detailed scripts or steps below)
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note
Please refer to [Release Notes Language Style Guide](https://pingcap.github.io/tidb-dev-guide/contribute-to-tidb/release-notes-style-guide.html) to write a quality release note.
If you don't think this PR needs a release note then fill it with `None`.