Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
116317: roachtest: explicitly close monitor reader after closing session r=DarrylWong,renatolabs a=herkolategan

Previously the reader did not close, even though the session is closed. This change ensures the reader is closed by closing it after the session has been closed. This seems to have only been a problem with local clusters.

Fixes: cockroachdb#116314

Epic: None
Release Note: None

124272: roachtest: lower max-upgrades in `tpcc/mixed-headroom` r=srosenberg a=renatolabs

Avoids timeouts.

Fixes: cockroachdb#124264

Release note: None

Co-authored-by: Herko Lategan <herko@cockroachlabs.com>
Co-authored-by: Renato Costa <renato@cockroachlabs.com>
  • Loading branch information
3 people committed May 17, 2024
3 parents 444ff68 + dcbc038 + a190005 commit 6918532
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/cmd/roachtest/tests/tpcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,10 @@ func runTPCCMixedHeadroom(ctx context.Context, t test.Test, c cluster.Cluster) {
bankRows = 1000
}

mvt := mixedversion.NewTest(ctx, t, t.L(), c, crdbNodes)
mvt := mixedversion.NewTest(
ctx, t, t.L(), c, crdbNodes,
mixedversion.MaxUpgrades(3),
)

importTPCC := func(ctx context.Context, l *logger.Logger, rng *rand.Rand, h *mixedversion.Helper) error {
randomNode := c.Node(crdbNodes.SeededRandNode(rng)[0])
Expand Down
3 changes: 3 additions & 0 deletions pkg/roachprod/install/cluster_synced.go
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,9 @@ wait
go func() {
<-monitorCtx.Done()
sess.Close()
if pc, ok := p.(io.ReadCloser); ok {
_ = pc.Close()
}
}()

readerWg.Wait()
Expand Down

0 comments on commit 6918532

Please sign in to comment.