From 18c494923740e3da898567e799e634860d6dab90 Mon Sep 17 00:00:00 2001 From: Christopher Schleiden Date: Fri, 17 Nov 2023 08:12:33 -0800 Subject: [PATCH] Remove extraneous query for mysql backend --- backend/mysql/mysql.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/backend/mysql/mysql.go b/backend/mysql/mysql.go index 453d6e44..57e84370 100644 --- a/backend/mysql/mysql.go +++ b/backend/mysql/mysql.go @@ -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