Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: reduce the memory usage used by getAllHistoryDDL #35838

Closed
bb7133 opened this issue Jun 30, 2022 · 1 comment · Fixed by #36859
Closed

server: reduce the memory usage used by getAllHistoryDDL #35838

bb7133 opened this issue Jun 30, 2022 · 1 comment · Fixed by #36859
Labels
sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement.

Comments

@bb7133
Copy link
Member

bb7133 commented 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.

@bb7133 bb7133 added type/enhancement The issue or PR belongs to an enhancement. sig/sql-infra SIG: SQL Infra labels Jun 30, 2022
@hawkingrei
Copy link
Member

I think the parameter that supports the paging is reducing the memory usage.

for example

http://{TiDBIP}:10080/ddl/history?page=1&num=10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants