Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
61280: cli: add scheduled_jobs table to the debug zip r=miretskiy a=adityamaru

With scheduled backups in version 20.2 and beyond we would like to
expose the raw scheduled_jobs table to allow for easier debugging of
scheduled backup related issues.

Fixes: cockroachdb#61143

Release justification: non-production code changes

Release note: None

Co-authored-by: Aditya Maru <[email protected]>
  • Loading branch information
craig[bot] and adityamaru committed Mar 3, 2021
2 parents e2c9fb5 + 92c2bba commit 432d6dd
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/cli/testdata/zip/partial1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ retrieving SQL data for system.jobs... writing: debug/system.jobs.txt
retrieving SQL data for system.descriptor... writing: debug/system.descriptor.txt
retrieving SQL data for system.namespace... writing: debug/system.namespace.txt
retrieving SQL data for system.namespace2... writing: debug/system.namespace2.txt
retrieving SQL data for system.scheduled_jobs... writing: debug/system.scheduled_jobs.txt
retrieving SQL data for crdb_internal.kv_node_status... writing: debug/crdb_internal.kv_node_status.txt
retrieving SQL data for crdb_internal.kv_store_status... writing: debug/crdb_internal.kv_store_status.txt
retrieving SQL data for crdb_internal.schema_changes... writing: debug/crdb_internal.schema_changes.txt
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/testdata/zip/partial1_excluded
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ retrieving SQL data for system.jobs... writing: debug/system.jobs.txt
retrieving SQL data for system.descriptor... writing: debug/system.descriptor.txt
retrieving SQL data for system.namespace... writing: debug/system.namespace.txt
retrieving SQL data for system.namespace2... writing: debug/system.namespace2.txt
retrieving SQL data for system.scheduled_jobs... writing: debug/system.scheduled_jobs.txt
retrieving SQL data for crdb_internal.kv_node_status... writing: debug/crdb_internal.kv_node_status.txt
retrieving SQL data for crdb_internal.kv_store_status... writing: debug/crdb_internal.kv_store_status.txt
retrieving SQL data for crdb_internal.schema_changes... writing: debug/crdb_internal.schema_changes.txt
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/testdata/zip/partial2
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ retrieving SQL data for system.jobs... writing: debug/system.jobs.txt
retrieving SQL data for system.descriptor... writing: debug/system.descriptor.txt
retrieving SQL data for system.namespace... writing: debug/system.namespace.txt
retrieving SQL data for system.namespace2... writing: debug/system.namespace2.txt
retrieving SQL data for system.scheduled_jobs... writing: debug/system.scheduled_jobs.txt
retrieving SQL data for crdb_internal.kv_node_status... writing: debug/crdb_internal.kv_node_status.txt
retrieving SQL data for crdb_internal.kv_store_status... writing: debug/crdb_internal.kv_store_status.txt
retrieving SQL data for crdb_internal.schema_changes... writing: debug/crdb_internal.schema_changes.txt
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/testdata/zip/testzip
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ retrieving SQL data for system.jobs... writing: debug/system.jobs.txt
retrieving SQL data for system.descriptor... writing: debug/system.descriptor.txt
retrieving SQL data for system.namespace... writing: debug/system.namespace.txt
retrieving SQL data for system.namespace2... writing: debug/system.namespace2.txt
retrieving SQL data for system.scheduled_jobs... writing: debug/system.scheduled_jobs.txt
retrieving SQL data for crdb_internal.kv_node_status... writing: debug/crdb_internal.kv_node_status.txt
retrieving SQL data for crdb_internal.kv_store_status... writing: debug/crdb_internal.kv_store_status.txt
retrieving SQL data for crdb_internal.schema_changes... writing: debug/crdb_internal.schema_changes.txt
Expand Down
3 changes: 3 additions & 0 deletions pkg/cli/testdata/zip/unavailable
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ writing: debug/system.namespace.txt.err.txt
retrieving SQL data for system.namespace2... writing: debug/system.namespace2.txt
writing: debug/system.namespace2.txt.err.txt
^- resulted in ...
retrieving SQL data for system.scheduled_jobs... writing: debug/system.scheduled_jobs.txt
writing: debug/system.scheduled_jobs.txt.err.txt
^- resulted in ...
retrieving SQL data for crdb_internal.kv_node_status... writing: debug/crdb_internal.kv_node_status.txt
writing: debug/crdb_internal.kv_node_status.txt.err.txt
^- resulted in ...
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/zip_cluster_wide.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ var debugZipTablesPerCluster = []string{
"system.descriptor", // descriptors also contain job-like mutation state.
"system.namespace",
"system.namespace2", // TODO(sqlexec): consider removing in 20.2 or later.
"system.scheduled_jobs",

"crdb_internal.kv_node_status",
"crdb_internal.kv_store_status",
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/zip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ ORDER BY name ASC`)
"system.descriptor",
"system.namespace",
"system.namespace2",
"system.scheduled_jobs",
)
sort.Strings(tables)

Expand Down

0 comments on commit 432d6dd

Please sign in to comment.