Skip to content

Commit

Permalink
roachtest/tests: adjust sqlsmith slightly
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yuzefovich committed Aug 16, 2021
1 parent ee3efd6 commit c987fc9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pkg/cmd/roachtest/tests/sqlsmith.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c987fc9

Please sign in to comment.