Skip to content

Fix #785: Atomic webhook retry increment to prevent race condition#803

Open
GhanshyamJha05 wants to merge 1 commit into
Coder-s-OG-s:mainfrom
GhanshyamJha05:fix/atomic-webhook-retry-increment
Open

Fix #785: Atomic webhook retry increment to prevent race condition#803
GhanshyamJha05 wants to merge 1 commit into
Coder-s-OG-s:mainfrom
GhanshyamJha05:fix/atomic-webhook-retry-increment

Conversation

@GhanshyamJha05

@GhanshyamJha05 GhanshyamJha05 commented Jul 25, 2026

Copy link
Copy Markdown
Contributor
  • Add PostgreSQL function increment_webhook_retry_count with row-level locking
  • Replace check-then-act pattern with atomic RPC call in retry endpoint
  • Apply same fix to server action retryFailedWebhookEvent
  • Update tests to mock RPC call and test concurrent scenario
  • Prevents concurrent retry requests from bypassing retry limit

fix issue #785

…condition

- Add PostgreSQL function increment_webhook_retry_count with row-level locking
- Replace check-then-act pattern with atomic RPC call in retry endpoint
- Apply same fix to server action retryFailedWebhookEvent
- Update tests to mock RPC call and test concurrent scenario
- Prevents concurrent retry requests from bypassing retry limit
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

@GhanshyamJha05 is attempting to deploy a commit to the codersogs-3057's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Ayush4958

Copy link
Copy Markdown
Collaborator

@GhanshyamJha05
mention the issue no.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants