Skip to content

Commit

Permalink
cli: add fallback query support for debug zip
Browse files Browse the repository at this point in the history
Previously, when SQL queries for dumping tables to debug zip would
fail, we would have no follow-up. Engineers can now define "fallback"
queries for tables in debug zip in order to make a second attempt
with a simpler query. Often we want to run a more complex query to
gather more debug data but these queries can fail when the cluster
is experiencing problems. This change gives us a chance to define a
simpler approach that can be attempted when necessary.

In order to define a fallback, there are two new optional fields in
the `TableRegistryConfig` struct for redacted and unredacted queries
respectively.

Debug zip output will still include the failed attempts at the
original query along with the error message file as before. If a
fallback query is defined, that query will produce its own output (and
error) file with an additional `.fallback` suffix added to the base
table name to identify it.

Resolves: cockroachdb#123964
Epic: CRDB-35278

Release note: None
  • Loading branch information
dhartunian committed Aug 5, 2024
1 parent 7748ab2 commit 489856c
Show file tree
Hide file tree
Showing 5 changed files with 492 additions and 16 deletions.
Loading

0 comments on commit 489856c

Please sign in to comment.