Skip to content

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

@YangKeao

Description

@YangKeao

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.

Metadata

Metadata

Assignees

Labels

affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.severity/moderatesig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions