MDEV-21452 fixup: Fix fake server hang reports
srv_monitor_task(): Make the innodb_fatal_semaphore_wait_threshold watchdog tolerate non-monotonic clock. On NUMA systems, the my_hrtime_coarse() executed by different NUMA nodes are not in sync, and the clock could appear to run backwards. We must treat negative time durations as zero, just like we did in commit ff5d306e in dict_sys_t::mutex_lock_wait(). The wrong logic caused occasional crashes of the test mariabackup.apply-log-only-incr when it was run concurrently with itself with a large number of instances.
Showing
Please register or sign in to comment