diff options
author | sjaakola <seppo.jaakola@iki.fi> | 2014-11-17 23:47:14 +0200 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-05-08 17:41:04 -0400 |
commit | 91417b404716e3c409a0a551a232c063d04f85a9 (patch) | |
tree | 6084078245eef8c1daf91f8df7ea85eb2684dac3 /storage/innobase/lock | |
parent | 13a9bcc6be4cb2e27c81c7e42bb534d8d1947870 (diff) | |
download | mariadb-git-91417b404716e3c409a0a551a232c063d04f85a9.tar.gz |
refs #7 - merged fix from 5.5 branch. However, 5.6 branch has not (yet) surfaced similar applier hang as 5.5
Diffstat (limited to 'storage/innobase/lock')
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 66033530a72..0be8f0be154 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -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", - type_mode, lock_is_on_supremum); - 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; - //abort(); + 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", + wsrep_thd_conflict_state(trx->mysql_thd, FALSE), + wsrep_thd_conflict_state(lock2->trx->mysql_thd, FALSE) ); + lock_rec_print(stderr, lock2); + if (for_locking) return FALSE; + //abort(); + } } else { /* if lock2->index->n_uniq <= lock2->index->n_user_defined_cols @@ -1110,7 +1116,7 @@ lock_rec_has_to_wait( #endif /* WITH_WSREP */ return(TRUE); } - + return(FALSE); } |