cockroachdb / cockroachdb/cockroach
jobs: Add method to resumer interface to return desired optional behaviors
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
Currently many per-job-type behaviors, such as having tracing spans or dumping traces, are configured by adding methods to the resumer and then using type-assert conditionals to see if the resumer has a certain method or other and then calling it to see if a given behavior is desired. Finding and adding all the desired methods is somewhat tedious for new job implementations to discover and implement correctly. Instead, we could add a single method to the `Resumer` interface to return a struct that has fields that control each of the common behaviors of the job system -- automatic tracing, profiling, etc -- so that a resumer just needs to return this struct and can easily enumerate the struct fields to decide which ones it wants to set.
Jira issue: CRDB-29880
Contributor guide
Assessment
This issue has not been assessed yet.