• Vladislav Vaintroub's avatar
    MDEV-21326 : Address TSAN warnings in tpool. · c27577a1
    Vladislav Vaintroub authored
    1. Fix places where data race warnings were relevant.
    
    tls_worker_data::m_state should be modified under mutex protection,
    since both maintainence timer and current worker set this flag.
    
    2. Suppress warnings that are legitimate, yet harmless.
    Apparently, the dirty reads in waitable_task::get_ref_count() or
    write_slots->pending_io_count()
    
    Avoiding race entirely without side-effects here is tricky,
    and the effects of race is harmless.
    
    The worst thing that can happen due to race is an extra wait notification,
    under rare circumstances.
    c27577a1
tpool.h 6.44 KB