Within TS-374 ([ba3b7d0]), it acquires the lock "bucket_mutex" in blocking mode instead of the original non-blocking mode.
we have encountered deadlock like #1335 and avoids such scenarios by #1756.
But it didn't prevent anyone from accidentally causing a deadlock similar to #1335.
By reading the comments of TS-374, reviewing the commit ([ba3b7d0]) and rewriting the HostDBProcessor::getby ( #4961 ), I have a new idea to TS-374.
- Can I create a thread local pool to hold a certain number of recent queries for HostDBInfos?
HostDBProcessor::getby() will lookup HostDBInfo from the thread local pool first, then will do MUTEX_TRY_LOCK on bucket_mutex if not found or has expired.
The solution will
- Resolve the TS-374 where a single (or very few) HostDB entries are under "pressure" in reverse proxy mode.
- Avoid the deadlock issues
@jplevyak @bryancall @SolidWallOfCode @vmamidi
Please leave your comments and ideas.
Thanks.
References:
Within TS-374 ([ba3b7d0]), it acquires the lock "bucket_mutex" in blocking mode instead of the original non-blocking mode.
we have encountered deadlock like #1335 and avoids such scenarios by #1756.
But it didn't prevent anyone from accidentally causing a deadlock similar to #1335.
By reading the comments of TS-374, reviewing the commit ([ba3b7d0]) and rewriting the
HostDBProcessor::getby( #4961 ), I have a new idea to TS-374.HostDBProcessor::getby()will lookup HostDBInfo from the thread local pool first, then will doMUTEX_TRY_LOCKonbucket_mutexif not found or has expired.The solution will
@jplevyak @bryancall @SolidWallOfCode @vmamidi
Please leave your comments and ideas.
Thanks.
References: