6 ms·
> the client would declare all locks upfront But if the client crashes after acquiring the locks, wouldn't your system be deadlocked?
by cx01 15y ago
> the client would declare all locks upfront
But if the client crashes after acquiring the locks, wouldn't your system be deadlocked?
- IgorPartola 15y agoBreaking the connection would release the locks.
- damienkatz 15y agoTCP doesn't "break" connections like that. Cleanly closing sockets breaks connections, but machines that crash or drop off the network won't be noticed until the connection times out, which is typically on the order of many minutes.
- IgorPartola 15y agoI realize that. My point is that existing locking systems work this way. For example, MySQL releases any table locks, rolls back the transaction and drops all temporary tables whenever the connection is closed or times out. This is no worse than what we already have.