The beginning of heartbeats for pessimistic locks may be too late
Opened this issue · 0 comments
ekexium commented
Current process:
- lock all keys
- start heartbeat
Consider we lock a lot of keys in a single command, which takes a long time. Before the heartbeat begins, some of the locks may be stale and removed.
A possible improvement:
- lock the primary key if it's not locked
- start heartbeat
- lock other keys