* fix(threadpool): MCOL-5565 queries stuck in FairThreadScheduler. (#3100)
Meta Primitive Jobs, .e.g ADD_JOINER, LAST_JOINER stuck
in Fair scheduler without out-of-band scheduler. Add OOB
scheduler back to remedy the issue.
* fix(messageqcpp): MCOL-5636 same node communication crashes transmiting PP errors to EM b/c error messaging leveraged socket that was a nullptr. (#3106)
* fix(threadpool): MCOL-5645 errenous threadpool Job ctor implictly sets socket shared_ptr to nullptr causing sigabrt when threadpool returns an error (#3125)
---------
Co-authored-by: drrtuy <roman.nozdrin@mariadb.com>
PP now uses PriorityThreadPool that arbitrary picks another jobs pack
to run. This scheduling discipline tend to run portions of a single query
forcing other simultaneous queries to wait. In result parallel queries
timings variance is high. The FairThreadPool picks the job with the smallest
amount of work done so far(see the code for details)
respondWait could be set to false
while other threads were waiting. With respondWait false, okToRrespond
wouldn't ever get notify_one(). Get rid of respondWait and use
fProcessorPool->blockedThreadCount to determine if any threads may be
waiting.
PriorityThreadPool didn't have very good error handling. If something
failed it would just ignore whatever was being processed. This could
lead to a query continuing without retreiving all of the required data.
This patch adds error handling, sending a message back to the client
and a log message. It also destroys and recreates the pool thread.