• Monty's avatar
    Fix for MDEV-12730 · 7fc25cfb
    Monty authored
    Assertion `count > 0' failed in rpl_parallel_thread_pool::
    get_thread, rpl.rpl_parallel failed in buildbot
    
    The reason for this is that one thread can call
    rpl_parallel_resize_pool_if_no_slaves() while
    another thread calls at the same time
    rpl_parallel_activate_pool(). If rpl_parallel_active_pool() is
    called before rpl_parallel_resize_pool_if_no_slaves() has
    finished, pool->count will be set to 0 even if there exists
    active slave threads.
    
    Added a mutex lock in rpl_parallel_activate_pool() to protect against this scenario, which seams to fix this issue.
    7fc25cfb
rpl_parallel.cc 88 KB