Closed sticnarf closed 4 years ago
PTAL @BusyJay cc @Little-Wallace
Any issue can cause if not fixed?
Any issue can cause if not fixed?
Not any known issue in TiKV 4.0.
There would be problem if a future in pool A reads TLS specific to pool A and the future is notified in another yatp pool B.
Previously we utilize local spawn as long as the TLS handle
LOCAL
exists.However, when a waker is called in a thread of a different yatp pool, the future can be transfered from one pool to another unexpectedly.
This PR checks whether the waker and the current local handle are of the same pool. If no, we spawn remotely.