Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: don't store large traces in statements_diagnostics table #61874

Closed
RaduBerinde opened this issue Mar 11, 2021 · 0 comments · Fixed by #61881
Closed

sql: don't store large traces in statements_diagnostics table #61874

RaduBerinde opened this issue Mar 11, 2021 · 0 comments · Fixed by #61881
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-postmortem Originated from a Postmortem action item.

Comments

@RaduBerinde
Copy link
Member

We currently store the trace JSON in the statement_diagnostics table. This trace can be large, and it can cause "command is too large" errors. We don't currently use the trace (it is also stored in the bundle zip), we should just remove it. As a backportable fix, we can just stop setting it when it is large.

@RaduBerinde RaduBerinde added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Mar 11, 2021
@RaduBerinde RaduBerinde self-assigned this Mar 11, 2021
RaduBerinde added a commit to RaduBerinde/cockroach that referenced this issue Mar 11, 2021
The trace JSON stored in the statement_diagnostics table can be
arbitrarily large which causes problems for very large queries. This
trace is not currently used, and is contained in the bundle itself.
We stop writing it to the table in this commit. We can remove the
column altogether in a separate change (it will require a migration).

Fixes cockroachdb#61874.

Release note (bug fix): Fixed "command is too large" errors in some
cases when using EXPLAIN ANALYZE (DEBUG) or statement diagnostics on
complex queries.
RaduBerinde added a commit to RaduBerinde/cockroach that referenced this issue Mar 12, 2021
The trace JSON stored in the statement_diagnostics table can be
arbitrarily large which causes problems for very large queries. This
trace is not currently used, and is contained in the bundle itself.
We stop writing it to the table in this commit. We can remove the
column altogether in a separate change (it will require a migration).

Fixes cockroachdb#61874.

Release note (bug fix): Fixed "command is too large" errors in some
cases when using EXPLAIN ANALYZE (DEBUG) or statement diagnostics on
complex queries.
craig bot pushed a commit that referenced this issue Mar 12, 2021
61602: tracing: add support for the DataDog open-tracer r=andreimatei a=andreimatei

Release note: Added support for the DataDog tracer. Set the
"trace.datadog.agent" cluster setting to enable it if you've got the
DataDog collector service running.

61870: sql: add logictest for SHOW CREATE ALL TABLES for udts/column families. r=RichardJCai a=RichardJCai

sql: add logictest for SHOW CREATE ALL TABLES for udts/column families.

Release note: None

61881: sql: stop writing trace to statement_diagnostics r=RaduBerinde a=RaduBerinde

The trace JSON stored in the statement_diagnostics table can be
arbitrarily large which causes problems for very large queries. This
trace is not currently used, and is contained in the bundle itself.
We stop writing it to the table in this commit. We can remove the
column altogether in a separate change (it will require a migration).

Fixes #61874.

Release note (bug fix): Fixed "command is too large" errors in some
cases when using EXPLAIN ANALYZE (DEBUG) or statement diagnostics on
complex queries.

Co-authored-by: Andrei Matei <[email protected]>
Co-authored-by: richardjcai <[email protected]>
Co-authored-by: Radu Berinde <[email protected]>
RaduBerinde added a commit to RaduBerinde/cockroach that referenced this issue Mar 12, 2021
The trace JSON stored in the statement_diagnostics table can be
arbitrarily large which causes problems for very large queries. This
trace is not currently used, and is contained in the bundle itself.
We stop writing it to the table in this commit. We can remove the
column altogether in a separate change (it will require a migration).

Fixes cockroachdb#61874.

Release note (bug fix): Fixed "command is too large" errors in some
cases when using EXPLAIN ANALYZE (DEBUG) or statement diagnostics on
complex queries.
@craig craig bot closed this as completed in 2d05a54 Mar 12, 2021
@lunevalex lunevalex added the O-postmortem Originated from a Postmortem action item. label Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-postmortem Originated from a Postmortem action item.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants