mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
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.
This commit is contained in:
parent
f3444c4a43
commit
d246630d73
3 changed files with 11 additions and 3 deletions
|
@ -1073,7 +1073,8 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
|
||||||
{
|
{
|
||||||
wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
|
wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
|
||||||
wsrep->resume(wsrep);
|
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);
|
int ret = wsrep->resync(wsrep);
|
||||||
if (ret != WSREP_OK)
|
if (ret != WSREP_OK)
|
||||||
|
@ -1149,8 +1150,10 @@ bool Global_read_lock::make_global_read_lock_block_commit(THD *thd)
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if already desynced or donor, avoid double desyncing */
|
/* if already desynced or donor, avoid double desyncing
|
||||||
if (wsrep_desync || wsrep_node_is_donor())
|
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_DEBUG("desync set upfont, skipping implicit desync for FTWRL: %d",
|
||||||
wsrep_desync);
|
wsrep_desync);
|
||||||
|
|
|
@ -1592,3 +1592,7 @@ bool wsrep_node_is_donor()
|
||||||
{
|
{
|
||||||
return (WSREP_ON) ? (local_status.get() == 2) : false;
|
return (WSREP_ON) ? (local_status.get() == 2) : false;
|
||||||
}
|
}
|
||||||
|
bool wsrep_node_is_synced()
|
||||||
|
{
|
||||||
|
return (WSREP_ON) ? (local_status.get() == 4) : false;
|
||||||
|
}
|
||||||
|
|
|
@ -331,4 +331,5 @@ void wsrep_init_sidno(const wsrep_uuid_t&);
|
||||||
#endif /* GTID_SUPPORT */
|
#endif /* GTID_SUPPORT */
|
||||||
|
|
||||||
bool wsrep_node_is_donor();
|
bool wsrep_node_is_donor();
|
||||||
|
bool wsrep_node_is_synced();
|
||||||
#endif /* WSREP_MYSQLD_H */
|
#endif /* WSREP_MYSQLD_H */
|
||||||
|
|
Loading…
Add table
Reference in a new issue