1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

10.4-MDEV-29684 Fixes for cluster wide write conflict resolving

The rather recent thd_need_ordering_with() function does not take
high priority transactions' order in consideration. Chaged this
funtion to compare also transaction seqnos and favor earlier transaction.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
This commit is contained in:
sjaakola
2022-10-12 15:07:20 +03:00
committed by Jan Lindström
parent 68cfcf9cb6
commit 0ff7f33c7b

View File

@ -5230,8 +5230,9 @@ thd_need_ordering_with(const MYSQL_THD thd, const MYSQL_THD other_thd)
(e.g. InnoDB does it by keeping lock_sys.mutex locked)
*/
if (WSREP_ON &&
wsrep_thd_is_BF(const_cast<THD *>(thd), false) &&
wsrep_thd_is_BF(const_cast<THD *>(other_thd), false))
wsrep_thd_is_BF(thd, false) &&
wsrep_thd_is_BF(other_thd, false) &&
wsrep_thd_order_before(thd, other_thd))
return 0;
#endif /* WITH_WSREP */
rgi= thd->rgi_slave;