The Two Workflows That Wrote to the Same Row and Both Said Success: Race Conditions in n8n
Описание и применение
В n8n два независимых рабочего процесса обновили одну строку в базе данных одновременно, каждый сообщая об успехе, но итоговый результат содержал только одно из изменений.
Задача
Two independent n8n workflows updated the same database row concurrently, each reporting success, yet the final record contained only one of the updates.
Результат
Race condition caused one update to overwrite the other; both workflows succeeded because they performed read-modify-write without concurrency protection.
Рабочий процесс
- Read customer record
- Modify specific field (plan or contact)
- Write entire record back
Доказательства
Two workflows wrote to the same customer record on the same night. One updated the plan from a billing webhook. The other updated the contact details from a form submission. Both executions said success.
The record that came out was neither update: the plan change was there, the contact change was gone, and nothing in either log suggested anything had been lost.
Each workflow read the record, changed its own field, and wrote the whole record back. The second write overwrote the first, not because either workflow was wrong about its own field, but because neither workflow knew the other had been there in between.
- Дата записи: 2026-11-04T03:14:01.581Z