---
title: "Discussion on \"Two webhooks, one millisecond, two duplicate contacts: fixing a race with SELECT … FOR UPDATE\" | Hashnode"
description: "Discussion on \"Two webhooks, one millisecond, two duplicate contacts: fixing a race with SELECT … FOR UPDATE\". Two webhooks for the same call arrived in the same millisecond and created duplicate contacts. How a row lock on the call fixed it, and how to test it."
url: "https://hashnode.com/posts/two-webhooks-one-millisecond-two-duplicate-contacts-fixing-a-race-with-select-for-update/6b0cfa1c39276de9c0e09c69"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Two webhooks, one millisecond, two duplicate contacts: fixing a race with SELECT … FOR UPDATE](https://voicepilotai.hashnode.dev/two-webhooks-one-millisecond-two-duplicate-contacts-fixing-a-race-with-select-for-update?utm_source=hashnode&utm_medium=feed)

Two webhooks for the same call arrived in the same millisecond and created duplicate contacts. How a row lock on the call fixed it, and how to test it.

5d ago · 5 min read · voicepilotai.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#postgresql](https://hashnode.com/tag/postgresql)
-   [#webhooks](https://hashnode.com/tag/webhooks)
-   [#sqlalchemy](https://hashnode.com/tag/sqlalchemy)

## Written by

[Équipe Voice Pilot](https://hashnode.com/@voicepilotai)

@voicepilotai · Lyon, France

  
[View profile](https://hashnode.com/@voicepilotai)

AI phone receptionist for French tradespeople and small businesses

Voice Pilot (voice-pilot.ai) is an AI phone receptionist for French tradespeople and small businesses: it answers calls 24/7 in French, books appointments and emails a summary of every call. We write about telephony, phone numbers and voice AI in practice.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
