Skip to content

Commit

Permalink
Merge pull request #104832 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1-104641

release-23.1: cli/doctor: address issues in the debug doctor command
  • Loading branch information
fqazi authored Jun 27, 2023
2 parents d30bce5 + 8d703df commit aa9ca41
Show file tree
Hide file tree
Showing 8 changed files with 290 additions and 9 deletions.
33 changes: 25 additions & 8 deletions pkg/cli/doctor.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,19 @@ FROM system.namespace`
stmt = `
SELECT id, status, payload, progress FROM "".crdb_internal.system_jobs
`
checkSystemJobs := `SELECT count(*) FROM "".crdb_internal.system_jobs LIMIT 1`
_, err = sqlConn.QueryRow(ctx, checkSystemJobs)
// On versions after 23.1, we have a new table called crdb_internal.system_jobs,
// if its not available fall back to system.jobs
if pgErr := (*pgconn.PgError)(nil); errors.As(err, &pgErr) {
if pgcode.MakeCode(pgErr.Code) == pgcode.UndefinedTable {
stmt = `
SELECT id, status, payload, progress FROM system.jobs
`
}
} else if err != nil {
return nil, nil, nil, err
}
jobsTable = make(doctor.JobsTable, 0)

if err := selectRowsMap(sqlConn, stmt, make([]driver.Value, 4), func(vals []driver.Value) error {
Expand All @@ -325,12 +338,10 @@ SELECT id, status, payload, progress FROM "".crdb_internal.system_jobs
}
md.Progress = &jobspb.Progress{}
// Progress is a nullable column, so have to check for nil here.
progressBytes, ok := vals[3].([]byte)
if !ok {
return errors.Errorf("unexpected NULL progress on job row: %v", md)
}
if err := protoutil.Unmarshal(progressBytes, md.Progress); err != nil {
return err
if progressBytes, ok := vals[3].([]byte); ok {
if err := protoutil.Unmarshal(progressBytes, md.Progress); err != nil {
return err
}
}
jobsTable = append(jobsTable, md)
return nil
Expand Down Expand Up @@ -402,16 +413,22 @@ func fromZipDir(
return errors.Wrapf(err, "failed to parse id %s", fields[3])
}
}

// Attempt to unquote any strings, if they aren't quoted,
// we will use the original raw string.
unquotedName := fields[2]
if updatedName := strings.TrimSuffix(strings.TrimPrefix(unquotedName, "\""), "\""); updatedName != unquotedName {
unquotedName = strings.Replace(updatedName, "\"\"", "\"", -1)
}
namespaceTable = append(namespaceTable, doctor.NamespaceTableRow{
NameInfo: descpb.NameInfo{
ParentID: descpb.ID(parID), ParentSchemaID: descpb.ID(parSchemaID), Name: fields[2],
ParentID: descpb.ID(parID), ParentSchemaID: descpb.ID(parSchemaID), Name: unquotedName,
},
ID: int64(id),
})
return nil
}); err != nil {
return nil, nil, nil, err

}

jobsTable = make(doctor.JobsTable, 0)
Expand Down
12 changes: 12 additions & 0 deletions pkg/cli/doctor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ func TestDoctorZipDir(t *testing.T) {
})
})

t.Run("examine", func(t *testing.T) {
out, err := c.RunWithCapture("debug doctor examine zipdir testdata/doctor/debugzip-with-quotes")
if err != nil {
t.Fatal(err)
}

// Using datadriven allows TESTFLAGS=-rewrite.
datadriven.RunTest(t, datapathutils.TestDataPath(t, "doctor", "test_examine_zipdir_with_quotes"), func(t *testing.T, td *datadriven.TestData) string {
return out
})
})

t.Run("recreate", func(t *testing.T) {
out, err := c.RunWithCapture("debug doctor recreate zipdir testdata/doctor/debugzip")
if err != nil {
Expand Down
66 changes: 66 additions & 0 deletions pkg/cli/testdata/doctor/debugzip-with-quotes/system.descriptor.txt

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions pkg/cli/testdata/doctor/debugzip-with-quotes/system.jobs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
id status created payload progress created_by_type created_by_id claim_session_id claim_instance_id num_runs last_run job_type hex_payload hex_progress
100 running 2023-06-09 00:16:04.219552 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:38.185486 KEY VISUALIZER NULL NULL
101 running 2023-06-09 00:16:04.303624 NULL NULL root 1 \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:38.185527 POLL JOBS STATS NULL NULL
102 running 2023-06-09 00:16:04.382817 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:04.413262 AUTO CONFIG RUNNER NULL NULL
103 running 2023-06-09 00:16:04.569394 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:38.184424 AUTO UPDATE SQL ACTIVITY NULL NULL
872282074347962369 running 2023-06-09 00:16:03.509523 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:03.568023 AUTO SPAN CONFIG RECONCILIATION NULL NULL
872282074394460161 succeeded 2023-06-09 00:16:03.523708 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:03.579117 MIGRATION NULL NULL
872282074799144961 succeeded 2023-06-09 00:16:03.647202 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:03.687376 MIGRATION NULL NULL
872282075065450497 succeeded 2023-06-09 00:16:03.728472 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:03.768654 MIGRATION NULL NULL
872282075346141185 succeeded 2023-06-09 00:16:03.814135 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:03.85303 MIGRATION NULL NULL
872282075596324865 succeeded 2023-06-09 00:16:03.890488 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:03.929652 MIGRATION NULL NULL
872282075901460481 succeeded 2023-06-09 00:16:03.983605 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:04.022955 MIGRATION NULL NULL
872282076227731457 succeeded 2023-06-09 00:16:04.083179 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:04.128471 MIGRATION NULL NULL
872282076498395137 succeeded 2023-06-09 00:16:04.165776 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:04.206519 MIGRATION NULL NULL
872282076789047297 succeeded 2023-06-09 00:16:04.254476 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:04.295388 MIGRATION NULL NULL
872282077051289601 succeeded 2023-06-09 00:16:04.334506 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:04.374708 MIGRATION NULL NULL
872282077334044673 succeeded 2023-06-09 00:16:04.420792 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:04.466678 MIGRATION NULL NULL
872282077654515713 succeeded 2023-06-09 00:16:04.518592 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:04.559792 MIGRATION NULL NULL
872282192874536961 succeeded 2023-06-09 00:16:39.674279 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:39.709865 IMPORT NULL NULL
872282192876109825 succeeded 2023-06-09 00:16:39.67555 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:39.708687 IMPORT NULL NULL
872282192876404737 succeeded 2023-06-09 00:16:39.675654 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:39.708539 IMPORT NULL NULL
872282192876535809 succeeded 2023-06-09 00:16:39.675774 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:39.709862 IMPORT NULL NULL
872282192876601345 succeeded 2023-06-09 00:16:39.675582 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:39.708604 IMPORT NULL NULL
872282192887611393 succeeded 2023-06-09 00:16:39.675727 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:39.716554 IMPORT NULL NULL
872282195104432129 succeeded 2023-06-09 00:16:40.355557 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:40.397076 NEW SCHEMA CHANGE NULL NULL
872282195478183937 succeeded 2023-06-09 00:16:40.469452 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:40.511376 NEW SCHEMA CHANGE NULL NULL
872282195863175169 succeeded 2023-06-09 00:16:40.586637 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:40.63146 NEW SCHEMA CHANGE NULL NULL
872282196262092801 succeeded 2023-06-09 00:16:40.708314 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:40.750167 NEW SCHEMA CHANGE NULL NULL
872282196646854657 succeeded 2023-06-09 00:16:40.826619 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:16:40.873153 NEW SCHEMA CHANGE NULL NULL
872282270976638977 succeeded 2023-06-09 00:17:03.515825 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:03.545617 AUTO CREATE STATS NULL NULL
872282271388106753 succeeded 2023-06-09 00:17:03.641399 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:03.669802 AUTO CREATE STATS NULL NULL
872282271701336065 succeeded 2023-06-09 00:17:03.736984 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:03.763714 AUTO CREATE STATS NULL NULL
872282272005062657 succeeded 2023-06-09 00:17:03.829677 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:03.858025 AUTO CREATE STATS NULL NULL
872282272308527105 succeeded 2023-06-09 00:17:03.922284 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:03.95073 AUTO CREATE STATS NULL NULL
872282272633356289 succeeded 2023-06-09 00:17:04.021414 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:04.050748 AUTO CREATE STATS NULL NULL
872282273011335169 succeeded 2023-06-09 00:17:04.136763 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:04.164819 AUTO CREATE STATS NULL NULL
872282273306181633 succeeded 2023-06-09 00:17:04.226743 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:04.255013 AUTO CREATE STATS NULL NULL
872282273596997633 succeeded 2023-06-09 00:17:04.315497 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:04.342693 AUTO CREATE STATS NULL NULL
872282273887715329 succeeded 2023-06-09 00:17:04.404212 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:04.431822 AUTO CREATE STATS NULL NULL
872282274186330113 succeeded 2023-06-09 00:17:04.495349 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:04.522367 AUTO CREATE STATS NULL NULL
872282274487238657 succeeded 2023-06-09 00:17:04.587177 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:04.614826 AUTO CREATE STATS NULL NULL
872282274841296897 succeeded 2023-06-09 00:17:04.695228 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:04.722828 AUTO CREATE STATS NULL NULL
872282275192209409 succeeded 2023-06-09 00:17:04.80232 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:04.829458 AUTO CREATE STATS NULL NULL
872282275495968769 succeeded 2023-06-09 00:17:04.895015 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:04.924371 AUTO CREATE STATS NULL NULL
872282275782557697 succeeded 2023-06-09 00:17:04.982479 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:05.011073 AUTO CREATE STATS NULL NULL
872282276081008641 succeeded 2023-06-09 00:17:05.073557 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:05.101204 AUTO CREATE STATS NULL NULL
872282276387258369 succeeded 2023-06-09 00:17:05.167019 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:05.194112 AUTO CREATE STATS NULL NULL
872282276725981185 succeeded 2023-06-09 00:17:05.270382 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:05.297587 AUTO CREATE STATS NULL NULL
872282277074468865 succeeded 2023-06-09 00:17:05.376736 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:05.404178 AUTO CREATE STATS NULL NULL
872282277419286529 succeeded 2023-06-09 00:17:05.481967 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:05.510008 AUTO CREATE STATS NULL NULL
872282277745950721 succeeded 2023-06-09 00:17:05.581651 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:05.608986 AUTO CREATE STATS NULL NULL
872282278071205889 succeeded 2023-06-09 00:17:05.680919 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:05.710314 AUTO CREATE STATS NULL NULL
872282278414647297 succeeded 2023-06-09 00:17:05.785725 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:05.814815 AUTO CREATE STATS NULL NULL
872282278707757057 succeeded 2023-06-09 00:17:05.875179 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:05.904532 AUTO CREATE STATS NULL NULL
872282279052148737 succeeded 2023-06-09 00:17:05.980273 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:06.010291 AUTO CREATE STATS NULL NULL
872282279372488705 succeeded 2023-06-09 00:17:06.078036 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:06.107272 AUTO CREATE STATS NULL NULL
872282279650525185 succeeded 2023-06-09 00:17:06.162886 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:06.190128 AUTO CREATE STATS NULL NULL
872282280000749569 succeeded 2023-06-09 00:17:06.269769 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:06.298256 AUTO CREATE STATS NULL NULL
872282280285569025 succeeded 2023-06-09 00:17:06.35669 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:06.385845 AUTO CREATE STATS NULL NULL
872282280637890561 succeeded 2023-06-09 00:17:06.464203 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:06.495306 AUTO CREATE STATS NULL NULL
872282281018818561 succeeded 2023-06-09 00:17:06.58046 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:06.609675 AUTO CREATE STATS NULL NULL
872282281349087233 succeeded 2023-06-09 00:17:06.681246 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:06.708317 AUTO CREATE STATS NULL NULL
872282281726509057 succeeded 2023-06-09 00:17:06.796424 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:06.82471 AUTO CREATE STATS NULL NULL
872282282080337921 succeeded 2023-06-09 00:17:06.904407 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:06.934478 AUTO CREATE STATS NULL NULL
872282282448158721 succeeded 2023-06-09 00:17:07.016661 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:07.04569 AUTO CREATE STATS NULL NULL
872282282926833665 succeeded 2023-06-09 00:17:07.162738 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:07.190952 AUTO CREATE STATS NULL NULL
872282283250581505 succeeded 2023-06-09 00:17:07.261539 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:07.289528 AUTO CREATE STATS NULL NULL
872282283553554433 succeeded 2023-06-09 00:17:07.353991 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:07.384699 AUTO CREATE STATS NULL NULL
872282283942051841 succeeded 2023-06-09 00:17:07.472561 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:07.502227 AUTO CREATE STATS NULL NULL
872282284298993665 succeeded 2023-06-09 00:17:07.581484 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:07.610209 AUTO CREATE STATS NULL NULL
872282284895502337 succeeded 2023-06-09 00:17:07.763527 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:07.792739 AUTO CREATE STATS NULL NULL
872282285416087553 succeeded 2023-06-09 00:17:07.922396 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:07.952414 AUTO CREATE STATS NULL NULL
872282285783384065 succeeded 2023-06-09 00:17:08.034481 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:08.063991 AUTO CREATE STATS NULL NULL
872282286316847105 succeeded 2023-06-09 00:17:08.197284 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:08.224466 AUTO CREATE STATS NULL NULL
872282286635220993 succeeded 2023-06-09 00:17:08.294446 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:08.323058 AUTO CREATE STATS NULL NULL
872282286987313153 succeeded 2023-06-09 00:17:08.4019 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:17:08.431055 AUTO CREATE STATS NULL NULL
872282483939246081 succeeded 2023-06-09 00:18:08.506853 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:18:08.53628 AUTO CREATE STATS NULL NULL
872282484307329025 succeeded 2023-06-09 00:18:08.619184 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:18:08.648149 AUTO CREATE STATS NULL NULL
872282484695859201 succeeded 2023-06-09 00:18:08.737757 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:18:08.7684 AUTO CREATE STATS NULL NULL
872282485063647233 succeeded 2023-06-09 00:18:08.849991 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:18:08.880908 AUTO CREATE STATS NULL NULL
872282485502738433 succeeded 2023-06-09 00:18:08.983999 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:18:09.013331 AUTO CREATE STATS NULL NULL
872282485864693761 succeeded 2023-06-09 00:18:09.094453 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:18:09.124317 AUTO CREATE STATS NULL NULL
872282486408937473 succeeded 2023-06-09 00:18:09.260544 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:18:09.289183 AUTO CREATE STATS NULL NULL
872282683413102593 succeeded 2023-06-09 00:19:09.381445 NULL NULL NULL NULL \x010180f454cbfd5b7e4f42a0d71c5c33c4ba5d 1 1 2023-06-09 00:19:09.413626 AUTO CREATE STATS NULL NULL
67 changes: 67 additions & 0 deletions pkg/cli/testdata/doctor/debugzip-with-quotes/system.namespace.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
parentID parentSchemaID name id
0 0 defaultdb 100
0 0 movr 104
0 0 postgres 102
0 0 system 1
1 0 public 29
1 29 comments 24
1 29 database_role_settings 44
1 29 descriptor 3
1 29 descriptor_id_seq 7
1 29 eventlog 12
1 29 external_connections 52
1 29 job_info 53
1 29 jobs 15
1 29 join_tokens 41
1 29 lease 11
1 29 locations 21
1 29 migrations 40
1 29 namespace 30
1 29 privileges 51
1 29 protected_ts_meta 31
1 29 protected_ts_records 32
1 29 rangelog 13
1 29 replication_constraint_stats 25
1 29 replication_critical_localities 26
1 29 replication_stats 27
1 29 reports_meta 28
1 29 role_id_seq 48
1 29 role_members 23
1 29 role_options 33
1 29 scheduled_jobs 37
1 29 settings 6
1 29 span_configurations 47
1 29 span_stats_buckets 55
1 29 span_stats_samples 56
1 29 span_stats_tenant_boundaries 57
1 29 span_stats_unique_keys 54
1 29 sql_instances 46
1 29 sqlliveness 39
1 29 statement_activity 60
1 29 statement_bundle_chunks 34
1 29 statement_diagnostics 36
1 29 statement_diagnostics_requests 35
1 29 statement_statistics 42
1 29 table_statistics 20
1 29 task_payloads 58
1 29 tenant_id_seq 62
1 29 tenant_settings 50
1 29 tenant_tasks 59
1 29 tenant_usage 45
1 29 tenants 8
1 29 transaction_activity 61
1 29 transaction_statistics 43
1 29 ui 14
1 29 users 4
1 29 web_sessions 19
1 29 zones 5
100 0 public 101
100 101 """MisplacedSchema"".t" 112
102 0 public 103
104 0 public 105
104 105 promo_codes 110
104 105 rides 108
104 105 user_promo_codes 111
104 105 users 106
104 105 vehicle_location_histories 109
104 105 vehicles 107
2 changes: 1 addition & 1 deletion pkg/cli/testdata/doctor/test_examine_zipdir
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
debug doctor examine zipdir testdata/doctor/debugzip
debug doctor examine zipdir testdata/doctor/debugzip-wth
----
debug doctor examine zipdir testdata/doctor/debugzip 21.1-52
WARNING: errors occurred during the production of system.jobs.txt, contents may be missing or incomplete.
Expand Down
6 changes: 6 additions & 0 deletions pkg/cli/testdata/doctor/test_examine_zipdir_with_quotes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
debug doctor examine zipdir testdata/doctor/debugzip-with-quotes
----
debug doctor examine zipdir testdata/doctor/debugzip-with-quotes
Examining 65 descriptors and 66 namespace entries...
Examining 0 jobs...
No problems found!
Loading

0 comments on commit aa9ca41

Please sign in to comment.