You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, when you ran an INSPECT job we didn't maintain any kind of
progress tracking. This commit adds it. The granularity that we use for
progress tracking is with checks x spans. Note: each check won't always
use all spans, so we only count spans that apply to the check.
The processors flow back the completed checks (per span) they have done.
A goroutine runs at the coordinator that will peridocially (every 10
seconds) update the job data with the progress update.
Informs #148297
Release note: none
Epic: CRDB-30356
r.QueryRow(t, `SELECT status FROM [SHOW JOBS] WHERE job_type = 'INSPECT' ORDER BY job_id DESC LIMIT 1`).Scan(&jobStatus)
521
+
varfractionCompletedfloat64
522
+
r.QueryRow(t, `SELECT status, fraction_completed FROM [SHOW JOBS] WHERE job_type = 'INSPECT' ORDER BY job_id DESC LIMIT 1`).Scan(&jobStatus, &fractionCompleted)
522
523
523
524
iftc.expectedErrRegex=="" {
524
525
require.Equal(t, "succeeded", jobStatus, "expected job to succeed when no issues found")
526
+
require.InEpsilon(t, 1.0, fractionCompleted, 0.01, "progress should reach 100%% on successful completion")
525
527
} else {
526
528
require.Equal(t, "failed", jobStatus, "expected job to fail when inconsistencies found")
require.NoError(t, err, "should succeed on table with reserved word column names")
576
578
require.Equal(t, 0, issueLogger.numIssuesFound(), "No issues should be found in happy path test")
577
579
578
-
// Verify job succeeded
580
+
// Verify job succeeded and progress reached 100%
579
581
varjobStatusstring
580
-
r.QueryRow(t, `SELECT status FROM [SHOW JOBS] WHERE job_type = 'INSPECT' ORDER BY job_id DESC LIMIT 1`).Scan(&jobStatus)
582
+
varfractionCompletedfloat64
583
+
r.QueryRow(t, `SELECT status, fraction_completed FROM [SHOW JOBS] WHERE job_type = 'INSPECT' ORDER BY job_id DESC LIMIT 1`).Scan(&jobStatus, &fractionCompleted)
581
584
require.Equal(t, "succeeded", jobStatus, "INSPECT job should succeed")
585
+
require.InEpsilon(t, 1.0, fractionCompleted, 0.01, "progress should reach 100%% on successful completion")
0 commit comments