• Krunal Bauskar's avatar
    MDEV-25029: Reduce dict_sys mutex contention for read-only workload · d231d813
    Krunal Bauskar authored
    In theory, read-only workload shouldn't have anything to do with
    dict_sys mutex. dict_sys mutex is meant to protect database metadata.
    
    But then why does dict_sys mutex shows up as part of a read-only workload?
    This workload needs to fetch stats for query processing and while reading
    these stats dict_sys mutex is taken.
    
    Is this really needed?
    No. For the traditional reasons, it was the default global mutex used.
    
    Based on 10.6 changes, flow can now use table->lock_mutex to protect
    update/access of these stats. table mutexes being table specific
    global contention arising out of dict_sys is reduced.
    
    Thanks to Marko Makela for his early suggestion around proposed alternative
    and review of the draft patch.
    d231d813
dict0dict.cc 140 KB