Hacker News new | past | comments | ask | show | jobs | submit login

It can definitely be a problem in Node.js. Assuming the workflow is read from disk -> modify -> write to disk, and that you're using the async fs functions, two async code paths running at the same time will have last-write-wins semantics and will lose data.

That's the naive scenario. If all code paths write out a global data structure, then it'd be fine. Or if the file is written append-only instead of as a single, atomic data structure, then it could be fine.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: