cockroachdb / cockroachdb/cockroach

insights: disable insights processes and clear the store if capacity is 0

Open
#125,501 1 comment 0 reactions 1 assignee Claimed by @xinhaoz View on GitHub
C-bug T-observability
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

If the insights store capacity (sql.insights.execution_insights_capacity) is set to 0, this should effectively disable the feature.
Currently, setting this to 0 does not disable the collection process - instead at the time of insertion into the store, items are evicted to adhere to the capacity setting. Thus there is no direct way of clearing the store while disabling the collection process. While no new insights would be inserted, we continue to do all this unnecessary work.

**Expected behavior**
One would expect that the store is immediately cleared and collection is disabled when the capacity is set to 0.

**Environment:**
- 23.1+

Jira Issue: CRDB-39489

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.