vitess icon indicating copy to clipboard operation
vitess copied to clipboard

Feature Request: Support for new API TryLock at Topo level.

Open rsajwani opened this issue 3 years ago • 0 comments

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.

rsajwani avatar Sep 21 '22 01:09 rsajwani