-
Notifications
You must be signed in to change notification settings - Fork 4.1k
jobs: Add MarkIdle API #74747
Copy link
Copy link
Closed
Labels
A-jobsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-jobs
Description
A running job may want to mark itself Idle. And idle job may be shutdown.
MarkIdle should increment a counter keeping track of the number of idle jobs.
Initial Design for the purposes of allowing CDC to function on Serverless:
- A
jobs_[type]_currently_idlemetric will track the number of idle jobs of that type. Using metrics allows for serverless to not rely on the jobs table - For now, idleness state will only be stored in the Registry rather than worrying about persisted state yet.
- Idleness should not be updated more often than twice a minute (so jobs should wait at least 1 minute since becoming active before marking themselves idle again). This allows changes to idleness state to be logged.
This doesn't allow for observability into individual jobs, but this can easily be added as followup.
Epic CRDB-8671
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-jobsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-jobs