Commit 91417b40 authored by sjaakola's avatar sjaakola Committed by Nirbhay Choubey

refs #7 - merged fix from 5.5 branch. However, 5.6 branch has not (yet)...

refs #7 - merged fix from 5.5 branch. However, 5.6 branch has not (yet) surfaced similar applier hang as 5.5
parent 13a9bcc6
......@@ -1067,12 +1067,13 @@ lock_rec_has_to_wait(
#ifdef WITH_WSREP
/* if BF thread is locking and has conflict with another BF
thread, we need to look at trx ordering and lock types */
if (for_locking &&
wsrep_thd_is_BF(trx->mysql_thd, FALSE) &&
if (wsrep_thd_is_BF(trx->mysql_thd, FALSE) &&
wsrep_thd_is_BF(lock2->trx->mysql_thd, TRUE)) {
if (wsrep_debug) {
fprintf(stderr, "\n BF-BF lock conflict \n");
fprintf(stderr,
"BF-BF lock conflict, locking: %lu\n",
for_locking);
lock_rec_print(stderr, lock2);
}
......@@ -1081,16 +1082,21 @@ lock_rec_has_to_wait(
(type_mode & LOCK_MODE_MASK) == LOCK_X &&
(lock2->type_mode & LOCK_MODE_MASK) == LOCK_X)
{
/* exclusive lock conflicts are not accepted */
fprintf(stderr, "BF-BF X lock conflict,"
"type_mode: %lu supremum: %lu\n",
if (for_locking || wsrep_debug) {
/* exclusive lock conflicts are not
accepted */
fprintf(stderr,
"BF-BF X lock conflict,"
"mode: %lu supremum: %lu\n",
type_mode, lock_is_on_supremum);
fprintf(stderr, "conflicts states: my %d locked %d\n",
fprintf(stderr,
"conflicts states: my %d locked %d\n",
wsrep_thd_conflict_state(trx->mysql_thd, FALSE),
wsrep_thd_conflict_state(lock2->trx->mysql_thd, FALSE) );
lock_rec_print(stderr, lock2);
return FALSE;
if (for_locking) return FALSE;
//abort();
}
} else {
/* if lock2->index->n_uniq <=
lock2->index->n_user_defined_cols
......
......@@ -1068,12 +1068,13 @@ lock_rec_has_to_wait(
#ifdef WITH_WSREP
/* if BF thread is locking and has conflict with another BF
thread, we need to look at trx ordering and lock types */
if (for_locking &&
wsrep_thd_is_BF(trx->mysql_thd, FALSE) &&
if (wsrep_thd_is_BF(trx->mysql_thd, FALSE) &&
wsrep_thd_is_BF(lock2->trx->mysql_thd, TRUE)) {
if (wsrep_debug) {
fprintf(stderr, "\n BF-BF lock conflict \n");
fprintf(stderr,
"BF-BF lock conflict, locking: %lu\n",
for_locking);
lock_rec_print(stderr, lock2);
}
......@@ -1082,16 +1083,21 @@ lock_rec_has_to_wait(
(type_mode & LOCK_MODE_MASK) == LOCK_X &&
(lock2->type_mode & LOCK_MODE_MASK) == LOCK_X)
{
/* exclusive lock conflicts are not accepted */
fprintf(stderr, "BF-BF X lock conflict,"
"type_mode: %lu supremum: %lu\n",
if (for_locking || wsrep_debug) {
/* exclusive lock conflicts are not
accepted */
fprintf(stderr,
"BF-BF X lock conflict,"
"mode: %lu supremum: %lu\n",
type_mode, lock_is_on_supremum);
fprintf(stderr, "conflicts states: my %d locked %d\n",
fprintf(stderr,
"conflicts states: my %d locked %d\n",
wsrep_thd_conflict_state(trx->mysql_thd, FALSE),
wsrep_thd_conflict_state(lock2->trx->mysql_thd, FALSE) );
lock_rec_print(stderr, lock2);
return FALSE;
if (for_locking) return FALSE;
//abort();
}
} else {
/* if lock2->index->n_uniq <=
lock2->index->n_user_defined_cols
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment