diff options
author | sjaakola <seppo.jaakola@iki.fi> | 2016-03-07 23:34:03 +0200 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-08-21 16:17:05 -0400 |
commit | d246630d739717a58d9b1c33705ce7f1d8504b43 (patch) | |
tree | eb6bd2e086019cfa11c976d99b665e0a899e9ff6 /sql/lock.cc | |
parent | f3444c4a436ecab23b535bb2ef24e02298aa7ae9 (diff) | |
download | mariadb-git-d246630d739717a58d9b1c33705ce7f1d8504b43.tar.gz |
Refs MW-252
- changed the condition when to do implicit desync as part of FTWRL to
cover only case when node is PC and synced. Donor node has alreaydy desycned
and other states mean that node is not in cluster, so desync is not even possible.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index fea28753739..7153b85d740 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -1073,7 +1073,8 @@ void Global_read_lock::unlock_global_read_lock(THD *thd) { wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED; wsrep->resume(wsrep); - if (!wsrep_desync && !wsrep_node_is_donor()) + /* resync here only if we did implicit desync earlier */ + if (!wsrep_desync && wsrep_node_is_synced()) { int ret = wsrep->resync(wsrep); if (ret != WSREP_OK) @@ -1149,8 +1150,10 @@ bool Global_read_lock::make_global_read_lock_block_commit(THD *thd) DBUG_RETURN(FALSE); } - /* if already desynced or donor, avoid double desyncing */ - if (wsrep_desync || wsrep_node_is_donor()) + /* if already desynced or donor, avoid double desyncing + if not in PC and synced, desyncing is not possible either + */ + if (wsrep_desync || !wsrep_node_is_synced()) { WSREP_DEBUG("desync set upfont, skipping implicit desync for FTWRL: %d", wsrep_desync); |