Skip to content

Commit

Permalink
lower transaction isolation for workflow create to level repeatable r…
Browse files Browse the repository at this point in the history
…ead to avoid concurrency error due to level serializable being overly strict

Signed-off-by: Kelly Deng <[email protected]>
  • Loading branch information
kqdeng authored and ryli17 committed Oct 23, 2020
1 parent e368e84 commit 9483ac6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var (

// CreateWorkflow creates a new workflow
func (d TinkDB) CreateWorkflow(ctx context.Context, wf Workflow, data string, id uuid.UUID) error {
tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelSerializable})
tx, err := d.instance.BeginTx(ctx, &sql.TxOptions{Isolation: sql.LevelRepeatableRead})
if err != nil {
return errors.Wrap(err, "BEGIN transaction")
}
Expand Down

0 comments on commit 9483ac6

Please sign in to comment.