vitess
vitess copied to clipboard
Feature Request: Support for new API TryLock at Topo level.
Feature Description
Topo.Lock is a blocking call. When concurrent calls to lock same shard happen the client gets block until the lock releases itself or context times out. But this create an issue where a lot of clients try to acquire lock all together and result in server getting overwhelmed.
In order to avoid server getting overwhelmed we need to introduce TryLock which is non-blocking and return immediately if it cannot acquire lock instead of waiting at server.
Use Case(s)
This can be called anywhere where we are doing LockShard call.