ddl: Atomically generate schema version to avoid schema version without differ
Open
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Atomically generate schema version along with setting schema diff. Otherwise, during sync schema changes, when a new schema version has been generated and can be read from meta key `SchemaVersionKey`, but the corresponding schema diff is not existed, it's difficult for the syncer to know whether the schema diff would be written later (and need backoff and retry), or it will never be written (due to some failure of TiDB).
Contributor guide
Assessment
This issue has not been assessed yet.