From e0d301aca79df1269e2d9bd97899d38ff846bb0f Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Thu, 22 Jan 2026 18:04:23 -0800 Subject: [PATCH] fix(idempotency): add conflict target to atomicallyClaimDb query --- apps/sim/lib/core/idempotency/service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/sim/lib/core/idempotency/service.ts b/apps/sim/lib/core/idempotency/service.ts index fad66b131..aa2bcbe96 100644 --- a/apps/sim/lib/core/idempotency/service.ts +++ b/apps/sim/lib/core/idempotency/service.ts @@ -228,7 +228,9 @@ export class IdempotencyService { result: inProgressResult, createdAt: new Date(), }) - .onConflictDoNothing() + .onConflictDoNothing({ + target: [idempotencyKey.key, idempotencyKey.namespace], + }) .returning({ key: idempotencyKey.key }) if (insertResult.length > 0) {