Skip to content

Commit 6a96857

Browse files
authored
Merge pull request #154517 from spilchen/blathers/backport-release-25.4-154277
release-25.4: sql/inspect: fix missing String() method for InspectDetails_Check_InspectCheckType
2 parents f7c9f9f + bad858b commit 6a96857

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

pkg/jobs/jobspb/jobs.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ message InspectDetails {
14311431
message Check {
14321432
enum InspectCheckType {
14331433
option (gogoproto.goproto_enum_prefix) = false;
1434-
option (gogoproto.goproto_enum_stringer) = false;
1434+
option (gogoproto.goproto_enum_stringer) = true;
14351435

14361436
// UNSPECIFIED indicates an unset check type. This is invalid.
14371437
INSPECT_CHECK_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "InspectCheckUnspecified"];

pkg/sql/logictest/testdata/logic_test/inspect

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,23 @@ SELECT description, status, finished IS NOT NULL AS finished FROM [SHOW JOBS] WH
2727
----
2828
EXPERIMENTAL SCRUB TABLE t1 AS OF SYSTEM TIME '-1us' succeeded true
2929

30+
# Verify the checks that were done.
31+
query TI
32+
SELECT
33+
json_extract_path_text(
34+
crdb_internal.pb_to_json('cockroach.sql.jobs.jobspb.Payload', payload),
35+
'inspectDetails', 'checks', '0', 'type'
36+
) AS check_type,
37+
jsonb_array_length(
38+
crdb_internal.pb_to_json('cockroach.sql.jobs.jobspb.Payload', payload) -> 'inspectDetails' -> 'checks'
39+
) AS num_checks
40+
FROM crdb_internal.system_jobs
41+
WHERE job_type = 'INSPECT'
42+
ORDER BY created DESC
43+
LIMIT 1
44+
----
45+
INSPECT_CHECK_INDEX_CONSISTENCY 1
46+
3047
subtest end
3148

3249
subtest scrub_job_multi_stmt_txn

0 commit comments

Comments
 (0)