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

timer will keep waiting for job if it exists in history but not exists in status and the owner stopped. #58510

Closed
YangKeao opened this issue Dec 24, 2024 · 0 comments · Fixed by #58539
Assignees
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/moderate type/bug The issue is confirmed as a bug.

Comments

@YangKeao
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Create a TTL table.
  2. After the entry in both tidb_ttl_table_status and tidb_ttl_job_history are created, drop the table.
  3. Make the owner fault

After a while, the owner will remove the job (as the logic in (*JobManager).checkNotOwnJob()), and nobody will update the history anymore.

Then the timer will always find the job because the entry in tidb_ttl_job_history still exists, and wait for it to finish.

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

Don't spawn new goroutine to wait for these not exist tables.

3. What did you see instead (Required)

Keeps waiting for the TTL job for non-exist table to finish.

@YangKeao YangKeao added the type/bug The issue is confirmed as a bug. label Dec 24, 2024
@YangKeao YangKeao changed the title timer will keep waiting for job if it exists in history but not exists in status and the owner halted timer will keep waiting for job if it exists in history but not exists in status and the owner stopped. Dec 24, 2024
@YangKeao YangKeao self-assigned this Dec 24, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 2a72e7f Dec 25, 2024
@YangKeao YangKeao 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 6, 2025
ti-chi-bot bot pushed a commit that referenced this issue Jan 7, 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/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
1 participant