From d31a393ae680f69c9d2e2486a41b0b98399cf2da Mon Sep 17 00:00:00 2001 From: Marcelo Rodrigues de Jesus Date: Fri, 23 May 2025 15:45:54 -0300 Subject: [PATCH] Fixed issue that causes error on parallel task execution on Postgres backend. --- backend/postgres/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/postgres/postgres.go b/backend/postgres/postgres.go index cf119de8..e8c9b6f2 100644 --- a/backend/postgres/postgres.go +++ b/backend/postgres/postgres.go @@ -311,7 +311,7 @@ func (be *postgresBackend) CompleteOrchestrationWorkItem(ctx context.Context, wi builder := strings.Builder{} builder.WriteString("INSERT INTO NewTasks (InstanceID, EventPayload) VALUES ") for i := 0; i < newActivityCount; i++ { - builder.WriteString(fmt.Sprintf("($%d, $%d)", 3*i+1, 3*i+2)) + builder.WriteString(fmt.Sprintf("($%d, $%d)", 2*i+1, 2*i+2)) if i < newActivityCount-1 { builder.WriteString(", ") }