Skip to content

Commit ac207ce

Browse files
committed
Remove extraneous query for mysql backend
1 parent f2db228 commit ac207ce

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

backend/mysql/mysql.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@ func (b *mysqlBackend) CreateWorkflowInstance(ctx context.Context, instance *wor
146146
}
147147
defer tx.Rollback()
148148

149-
// Check for existing instance
150-
if err := tx.QueryRowContext(ctx, "SELECT 1 FROM `instances` WHERE instance_id = ? LIMIT 1", instance.InstanceID).Scan(new(int)); err != sql.ErrNoRows {
151-
return backend.ErrInstanceAlreadyExists
152-
}
153-
154149
// Create workflow instance
155150
if err := createInstance(ctx, tx, instance, event.Attributes.(*history.ExecutionStartedAttributes).Metadata); err != nil {
156151
return err

0 commit comments

Comments
 (0)