• Vladislav Vaintroub's avatar
    Fix shutdown hang in dict_stats , caused by MDEV-16264 · 7c7f9bef
    Vladislav Vaintroub authored
    dict_stats_shutdown() can hang, waiting for timer callback to finish.
    This happens because locks the same mutex, which can also used inside
    timer callback, within dict_stats_schedule() function.
    
    Fix is to make dict_stats_schedule() use mutex.try_lock() instead of
    mutex.lock().
    
    In the unlikely case of simultaneous dict_stats_schedule() setting
    different timer delays, now the first one would win, which is fine.
    Important is that shutdown won't hang.
    7c7f9bef
dict0stats_bg.cc 13.6 KB