cockroachdb / cockroachdb/cockroach
persistedsqlstats: add retries to StatsCompactor
Open
C-enhancement
T-observability
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
If the `StatsCompactor` experiences a `RETRY_SERIALIZABLE` transaction retry error, we have to wait a long time before the next compaction attempt.
The error is returned to the jobs system as a retryable error, but the jobs system won't run the job again until another `sql.stats.cleanup.recurrence` period has passed.
In the case of transaction retry errors, we should use `pkg/util/retry` with an exponential back off in the `StatsCompactor` job itself.
Jira issue: CRDB-29895
Contributor guide
Assessment
This issue has not been assessed yet.