Skip to content

Commit

Permalink
Remove extraneous query for mysql backend
Browse files Browse the repository at this point in the history
  • Loading branch information
cschleiden committed Nov 17, 2023
1 parent 1a19993 commit 18c4949
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions backend/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ func (b *mysqlBackend) CreateWorkflowInstance(ctx context.Context, instance *wor
}
defer tx.Rollback()

// Check for existing instance
if err := tx.QueryRowContext(ctx, "SELECT 1 FROM `instances` WHERE instance_id = ? LIMIT 1", instance.InstanceID).Scan(new(int)); err != sql.ErrNoRows {
return backend.ErrInstanceAlreadyExists
}

// Create workflow instance
if err := createInstance(ctx, tx, instance, event.Attributes.(*history.ExecutionStartedAttributes).Metadata); err != nil {
return err
Expand Down

0 comments on commit 18c4949

Please sign in to comment.