cockroachdb / cockroachdb/cockroach

persistedsqlstats: add retries to StatsCompactor

Open
#107,108 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.