summaryrefslogtreecommitdiff
path: root/sql/wsrep_thd.h
diff options
context:
space:
mode:
authorsjaakola <seppo.jaakola@iki.fi>2022-10-06 15:16:06 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2023-01-13 13:11:03 +0200
commit66c05326d2a756329ce6fe2c5abb21230b424b4e (patch)
treefd5e725809f335e2fc3664ce8bc9503b54010846 /sql/wsrep_thd.h
parent71e8e4934db06c02db1b51716e9d4b3992505161 (diff)
downloadmariadb-git-66c05326d2a756329ce6fe2c5abb21230b424b4e.tar.gz
MDEV-29684 Fixes for cluster wide write conflict resolving
Cluster conflict victim's THD is marked with wsrep_aborter. THD::wsrep_aorter holds the thread ID of the hight priority tread, which is currently carrying out BF aborting for this victim. However, the BF abort operation is not always successful, and in such case the wsrep_aborter mark should be removed. In the old code, this wsrep_aborter resetting did not happen, and this could lead to a situation where the sticky wsrep_aborter mark prevents any further attempt to BF abort this transaction. This commit fixes this issue, and resets wsrep_aborter after unsuccesful BF abort attempt. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'sql/wsrep_thd.h')
-rw-r--r--sql/wsrep_thd.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/wsrep_thd.h b/sql/wsrep_thd.h
index e9add662e3f..cf8528c3165 100644
--- a/sql/wsrep_thd.h
+++ b/sql/wsrep_thd.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013-2022 Codership Oy <info@codership.com>
+/* Copyright (C) 2013-2023 Codership Oy <info@codership.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -88,7 +88,9 @@ bool wsrep_create_appliers(long threads, bool mutex_protected=false);
void wsrep_create_rollbacker();
bool wsrep_bf_abort(THD* bf_thd, THD* victim_thd);
-int wsrep_abort_thd(THD *bf_thd_ptr, THD *victim_thd_ptr, my_bool signal);
+int wsrep_abort_thd(THD *bf_thd,
+ THD *victim_thd,
+ my_bool signal) __attribute__((nonnull(1,2)));
/*
Helper methods to deal with thread local storage.