server: reduce the memory usage used by getAllHistoryDDL
#35838
Closed
Description
opened on Jun 30, 2022
Enhancement
TiDB provided a restful API to query all DDL jobs in the history: http://{TiDBIP}:10080/ddl/history
.
The initial intention of the API is to debug TiDB in an easy way. However, it has been used by some old ecosystem tools like 'drainer'.
When there are a lot of DDL jobs for a long-running cluster, DDL jobs list will be long and it takes a large amount of memory when querying http://{TiDBIP}:10080/ddl/history
.
For the compatibility with old tools, it is reasonable to try reducing the memory usage of getAllHistoryDDL
.
Activity