From c987fc9cf4db2f849da3c5e83cb7f5c70fd4fdb7 Mon Sep 17 00:00:00 2001 From: Yahor Yuzefovich Date: Mon, 16 Aug 2021 07:59:08 -0700 Subject: [PATCH] roachtest/tests: adjust sqlsmith slightly This commit adjusts `sqlsmith` roachtest slightly so that vectorized panic injection occurs with 50% probability (instead of 100%). This is done to check whether the panic injection is the root cause of the inbox communication errors we have been seeing sporadically. Release note: None --- pkg/cmd/roachtest/tests/sqlsmith.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/roachtest/tests/sqlsmith.go b/pkg/cmd/roachtest/tests/sqlsmith.go index 261bd3140bca..33cb5e174e37 100644 --- a/pkg/cmd/roachtest/tests/sqlsmith.go +++ b/pkg/cmd/roachtest/tests/sqlsmith.go @@ -132,11 +132,17 @@ func registerSQLSmith(r registry.Registry) { // other setup queries have already completed, including the smither // instantiation (otherwise, the setup might fail because of the // injected panics). - injectPanicsStmt := "SET testing_vectorize_inject_panics=true;" - if _, err := conn.Exec(injectPanicsStmt); err != nil { - t.Fatal(err) + if rng.Float64() < 0.5 { + // TODO(yuzefovich): at the moment we're only injecting panics with + // 50% probability in order to test the hypothesis that this panic + // injection is the root cause of the inbox communication errors we + // have been seeing sporadically. + injectPanicsStmt := "SET testing_vectorize_inject_panics=true;" + if _, err := conn.Exec(injectPanicsStmt); err != nil { + t.Fatal(err) + } + logStmt(injectPanicsStmt) } - logStmt(injectPanicsStmt) t.Status("smithing") until := time.After(t.Spec().(*registry.TestSpec).Timeout / 2)