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

If your database client is any good, it should do the retries for you. EdgeDB uses serializable isolation (as the only option), and all our bindings are coded to retry on transaction serialization errors by default.

Transaction deadlocks are another common issue that is triggered by concurrent transactions even at lower levels and should be retried also.




I'm curious how you can handle transaction deadlocks at a low level - there might have been a lot of non-SQL processing code that determined those values and blindly re-playing the transactions could result in incorrect data.

We handle this by passing our transaction a function to run - it will retry a few times if it gets a deadlock. But I don't consider this to be very low level.


“We handle this by passing our transaction a function to run - it will retry a few times if it gets a deadlock. But I don't consider this to be very low level.”

Oh neat, I was just thinking about something like this the other day.




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

Search: