Skip to content

ttl: add mechanism to trigger TTL job immediately for testing #146723

@spilchen

Description

@spilchen

Currently, if you want to run the TTL job in a live CockroachDB instance, the best available method is to update the TTL cron expression to fire in the next minute. However, even with this adjustment, it may still take several minutes before the job actually executes. This makes testing and debugging TTL behavior cumbersome.

This issue proposes adding a knob or built-in—intended primarily for testing purposes—that allows a user to start the TTL job more or less immediately.

We already have similar patterns implemented for other job types that could serve as models for TTL:

Jira issue: CRDB-50678

Epic CRDB-18322

Metadata

Metadata

Assignees

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)E-starterMight be suitable for a starter project for new employees or team members.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions