cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
29.79k stars 3.76k forks source link

sql: statement diagnostics should get schema asynchronously #49343

Open RaduBerinde opened 4 years ago

RaduBerinde commented 4 years ago

A user ran into an issue where they tried to collect statement diagnostics but the schema queries were taking too long and stalling the original query (which was getting canceled). We should do this collection asynchronously. We can't do it asynchronously for EXPLAIN ANALYZE (DEBUG) of course, so we'll need to have two codepaths.

CC @andreimatei

gz#5473

Jira issue: CRDB-4237

RaduBerinde commented 3 years ago

Note: when we do this, we should also make sure we catch any panics that happen for these statements. We had a bug where SHOW STATISTICS could panic, and it was bringing down the node.

github-actions[bot] commented 11 months ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!