• Marko Mäkelä's avatar
    MDEV-24884 Hang in ssux_lock_low::write_lock() · 272a1289
    Marko Mäkelä authored
    ssux_lock_low::write_lock(): Before invoking writer_wait(), keep
    attempting write_lock_wait_try() as long as no conflict exists.
    
    rw_lock::upgrade_trylock(): Relax a bogus assertion and correct
    the acquisition operation. Another thread may be executing in
    ssux_lock_low::write_lock() on the same latch. Because we are the
    only thread that can make progress on that latch, we must become
    the writer. Any waiting thread will be eventually woken up by
    ssux_lock_low::u_unlock() or ssux_lock_low::wr_unlock(), but not
    by wr_u_downgrade() because the upgrade is a very rare operation.
    272a1289
rw_lock.h 7.16 KB