Skip to content

Commit

Permalink
fix(jobs): use provided randomness source in mutate instead of global
Browse files Browse the repository at this point in the history
one
  • Loading branch information
nuivall committed Jun 22, 2023
1 parent f802c33 commit 5a97304
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/jobs/gen_mutate_stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ func GenMutateStmt(s *typedef.Schema, t *typedef.Table, g generators.GeneratorIn
if !deletes {
return genInsertOrUpdateStmt(s, t, valuesWithToken, r, p, useLWT)
}
switch n := rand.Intn(1000); n {
switch n := r.Intn(1000); n {
case 10, 100:
return genDeleteRows(s, t, valuesWithToken, r, p)
default:
switch rand.Intn(2) {
switch r.Intn(2) {
case 0:
if t.KnownIssues[typedef.KnownIssuesJSONWithTuples] {
return genInsertOrUpdateStmt(s, t, valuesWithToken, r, p, useLWT)
Expand Down

0 comments on commit 5a97304

Please sign in to comment.