Filter the DDL Job History based on DDL types
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Feature Request
**Is your feature request related to a problem? Please describe:**
Currently, DDL job history returns all the DDL jobs either by start_job_id or with limit. API not filtering the jobs based on the DDL type.
**Describe the feature you'd like:**
Extending DDL job history API to filter based on the DDL types.
`http://{TIDBIP}:10080/ddl/history?ddl_types="2,4,47"`
`http://{TIDBIP}:10080/ddl/history?ddl_types="2,4,47"&limit={number}`
**Describe alternatives you've considered:**
Requirements raised due to issues with incremental backups in TiDB have some limitations, incremental backup after certain types of DDL executed can lead to data inconsistency issues.
To solve this, we wanted to handle this situation with our backup scheduling platform, We will introduce a validation before triggering any incremental backup. If we encounter such DDLs, a full backup will be triggered instead of incremental.
Alternatively, we could have fetched all the jobs and iterated and checked for the existence of specific DDLs, in some cases if the number of jobs is more, it may lead to OOM issues. So we wanted to avoid such situations and filter only specific DDL jobs of the type we required.
Contributor guide
Assessment
This issue has not been assessed yet.