Skip to content

Commit 8f858b5

Browse files
craig[bot]dhartunianyuzefovichkev-cao
committed
154443: cli: remove duplicate `stmt` column from `node_distsql_flows` r=dhartunian a=dhartunian Resolves: #154442 Release note: None 154492: stmtdiagnostics: fix bizarre flake in TestDiagnosticsRequest r=yuzefovich a=yuzefovich We just saw a failure in `TestDiagnosticsRequest` where "RESET statement_timeout;" itself timed out. Prevent such a flake by wrapping with SucceedsSoon. Fixes: #154490. Release note: None 154531: restore: fix restore hanging on server stop r=msbutler a=kev-cao `RunTaskAsyncEx` returns an error if it is ran while the stopper is [stopping or quiescing](https://github.com/cockroachdb/cockroach/blob/52aaf2e7ea3f20aced87d1dcc87a1873fb87ffbe/pkg/util/stop/stopper.go#L498-L500). In the generative split and scatterer processor, in the event that the task is run during stopping/quiesce, the `doneScatterCh` is never closed. That means that any follow up `Next` calls on the processor will hang on receiving from the channel. Fixes: #153806 Release note: None Co-authored-by: David Hartunian <[email protected]> Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Kevin Cao <[email protected]>
4 parents 99ad9a0 + 224dfe7 + a836d5c + d5c8b90 commit 8f858b5

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

pkg/backup/generative_split_and_scatter_processor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ func (gssp *generativeSplitAndScatterProcessor) Start(ctx context.Context) {
367367
}); err != nil {
368368
gssp.scatterErr = err
369369
cancel()
370+
close(gssp.doneScatterCh)
370371
close(workerDone)
371372
}
372373
}

pkg/cli/zip_table_registry.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,6 @@ var zipInternalTablesPerNode = DebugZipTableRegistry{
854854
nonSensitiveCols: NonSensitiveColumns{
855855
"flow_id",
856856
"node_id",
857-
"stmt",
858857
"since",
859858
"crdb_internal.hide_sql_constants(stmt) as stmt",
860859
},

pkg/sql/stmtdiagnostics/statement_diagnostics_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,12 @@ func TestDiagnosticsRequest(t *testing.T) {
173173
require.True(t, strings.Contains(err.Error(), sqlerrors.QueryTimeoutError.Error()))
174174

175175
// Reset the stmt timeout so that it doesn't affect the query in
176-
// checkCompleted.
177-
runner.Exec(t, "RESET statement_timeout;")
176+
// checkCompleted. Wrap it in a SucceedsSoon in case RESET query itself
177+
// times out.
178+
testutils.SucceedsSoon(t, func() error {
179+
_, err = db.Exec("RESET statement_timeout;")
180+
return err
181+
})
178182
checkCompleted(reqID)
179183
})
180184

0 commit comments

Comments
 (0)