pingcap / tipocket

A toolkit for testing TiDB
https://github.com/pingcap/tipocket
Apache License 2.0
140 stars 71 forks source link

Check some locks in a loop in pipelined-pessimistic-lock test #445

Closed sticnarf closed 2 years ago

sticnarf commented 2 years ago

What is changed and how does it work?

With in-memory pessimistic locks, the risk of immediate lock loss is low. But the loss risk is higher some while after the key is locked, because locks are transferred during region changes.

So, I add another mode that checks whether the lock exists in the next 500 milliseconds after locking. Hopefully this will test in-memory pessimistic locks better.

Does this PR introduce a user-facing change?:

NONE