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

This is not a thread safety issue though, this is a transaction problem.



It’s absolutely a thread safety issue. It’s not a data race, but it’s a race condition and can very much cause unexpected behaviour e.g. out of bounds error even though on its face it has the correct preconditions.


Wrapping these 2 statements in a transaction will not solve this particular issue unless the transactions are run sequentially.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: