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