cockroachdb / cockroachdb/cockroach

sql,stmtdiagnostics: Support the ability to record diagnostics for statement executed inside a UDF / SP

Open
#159,526 0 comments 0 reactions 0 assignees View on GitHub
A-sql-routine C-enhancement docs-known-limitation
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

We recently added support for recording statement statistics for statements executed within UDFs / SPs. These statements will now appear in the DB Console SQL Activity pages.

While SQL Stats now supports UDFs / SPs, these statement diagnostics bundles will not be collected for an active request for a fingerprint that is executed within a UDF / SP. This means that the an active statement diagnostics request will stay active until either: the statement is executed as its own query or the request expires.

This limitation exists because the current implementation of statement diagnostics requests handling is done in the conn executor, while sub statements in a UDF / SP are executed via distSQL directly.

Jira issue: CRDB-57913

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.