cockroachdb / cockroachdb/cockroach
Persist Insights to help users correlate problematic signals over time
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Is your feature request related to a problem? Please describe.**
Currently insights for SQL statements and transactions stored in memory only and this:
- doesn't allow to track historical data for insights as far as it has eviction policy that cleans up cache periodically
- after cluster restarts (relevant to tenant clusters), Insights are not available then;
- querying insights for large clusters becomes expensive as far as it should fan out request for every node in the cluster.
**Describe the solution you'd like**
- Periodically preserve insights in system table. It should use the same logic of flashing data to system table as for
`system.transaction_statistics` and `system.statement_activity` tables;
- Fallback to in-memory option in case requested insights haven't been flashed to system table yet.
Jira issue: CRDB-28612
Epic CC-28354
Contributor guide
Assessment
This issue has not been assessed yet.