| ▲ | forgotmy_login 12 hours ago | |||||||
Recalling from my previous studies here: I think you can use Serializable Isolation Level, the strictest level - this will cause one of the two to fail (that is; fail only when the two txns affected rows that would logically conflict). And then you build the expectation of such possible transaction failures into the code and treat retries as a first-class expectation. Does this get to what you're trying to solve at all? | ||||||||
| ▲ | 11 hours ago | parent | next [-] | |||||||
| [deleted] | ||||||||
| ▲ | ucarion 12 hours ago | parent | prev [-] | |||||||
It does get at what I'm talking about. But I've seen retrying in this situation lead to worsening the situation, because your basic problem is two hot paths conflicting with each other and now you're conflicting even more. | ||||||||
| ||||||||