| ▲ | lelanthran 6 hours ago | |||||||
> This isn't two-phase commit. Agreed > This is lock the DB indefinitely while remote system is processing and pray we don't crash saving the transaction after it completes. I don't really see the problem here (maybe due to my node.js skillz being less than excellent), because I don't see how it's locking the table; that one row would get locked, though. | ||||||||
| ▲ | Tostino 4 hours ago | parent [-] | |||||||
You are right. It is just a row level lock... But that doesn't change the fact you are explicitly choosing to use long running transactions, which adds to table bloat and eats active connections to your DB as mentioned. It also hurts things like reindexing. I prefer an optimistic locking solution for this type of thing. | ||||||||
| ||||||||