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

when ttl delete limiter interrupted, it's better to retry failed rows #58205

Closed
lcwangchao opened this issue Dec 12, 2024 · 0 comments · Fixed by #58206
Closed

when ttl delete limiter interrupted, it's better to retry failed rows #58205

lcwangchao opened this issue Dec 12, 2024 · 0 comments · Fixed by #58206
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@lcwangchao
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. start a TTL job, but set @@global.tidb_ttl_delete_rate_limit to a small value.
  2. shrink the delete worker by setting @@global.tidb_ttl_delete_worker_count

2. What did you expect to see? (Required)

We should reduce the error rows in this scene.

3. What did you see instead (Required)

You can see some error rows because the code:

if err = globalDelRateLimiter.Wait(ctx); err != nil {
t.statistics.IncErrorRows(len(delBatch))
return
}

The waiting rows are marked as error directly. It's better to retry them.

4. What is your TiDB version? (Required)

@lcwangchao lcwangchao added type/bug The issue is confirmed as a bug. severity/minor sig/sql-infra SIG: SQL Infra labels Dec 12, 2024
@lcwangchao lcwangchao added affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant