4 ms·
I'm thinking of a case where a process thinks it has a lock and tries to do things even though it doesn't have the lock. This happened on a project I was on, t
by samsquire 4y ago
I'm thinking of a case where a process thinks it has a lock and tries to do things even though it doesn't have the lock.
This happened on a project I was on, two processes would join a RabbitMQ on a service that was not safe to load balance.
I suspect it could happen if the program using your lock service is not implemented properly and the lease expires but the program doesn't realise.
- keyless_ 4y agoUltimately, you have to trust your clients to do the right thing. The lockable server guarantees that e.g. if multiple /acquire requests come in for the same lock in a short time span, only one request will be successful. You are correct in that, without care, there can be pathological cases where a client may not realize their lease has expired.