Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The article's statement "Putting them within a transaction is also no good, as you can't read and make decisions on the result (is the result of the select null?)" is not correct. You can implement task assignment in a SERIALIZABLE-capable RDBMS using a single "UPDATE ... SET assigned_to = 'me' WHERE assigned_to IS NULL" statement, or the equivalent of "SELECT FOR UPDATE" at the beginning of a transaction in order to examine the row in advance.


good call, I'll update that.

I generally assume mySQL's feature-set, which I probably shouldn't do without clarification.




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

Search: