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

Consider set a lower priority for LOAD DATA read and write RPC #49602

Open
overvenus opened this issue Dec 20, 2023 · 3 comments
Open

Consider set a lower priority for LOAD DATA read and write RPC #49602

overvenus opened this issue Dec 20, 2023 · 3 comments
Labels
report/customer Customers have encountered this bug. type/enhancement The issue or PR belongs to an enhancement.

Comments

@overvenus
Copy link
Member

Enhancement

LOAD DATA LOCAL INFILE ... IGNORE INTO ... may sends KvBatchGet requests that seeks lots of data. And it essentially becomes full table scan if data is load multiple times. These KvBatchGets are set normal priority, so it overwhelms TiKV read read pool and slows down other queries that involves point get or batch point get.

Reproduce:

  • Prepare a large csv file.
  • Repeatedly loads the file using LOAD DATA LOCAL INFILE ... IGNORE INTO ...

Two spikes are caused by LOAD DATA twice.
image

@overvenus overvenus added the type/enhancement The issue or PR belongs to an enhancement. label Dec 20, 2023
@lance6716
Copy link
Contributor

MySQL LOAD DATA has a LOW_PRIORITY modifier https://dev.mysql.com/doc/refman/8.0/en/load-data.html , maybe we can reuse it 🤔

And do you think we should limit the batch size of KvBatchGets as alternative?

@overvenus
Copy link
Member Author

LOW_PRIORITY modifier looks good to me. Limit batch size of KvBatchGets is not enough, it eventually seeks the same amount of data.

@seiya-annie
Copy link

/found customer

@ti-chi-bot ti-chi-bot bot added the report/customer Customers have encountered this bug. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
report/customer Customers have encountered this bug. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants