client connections are closed unconditionally before generating SST request

Bug #1258658 reported by Teemu Ollakka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Status tracked in 5.6
5.5
Fix Committed
Low
Teemu Ollakka
5.6
Fix Released
Low
Teemu Ollakka
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned

Bug Description

In wsrep_view_handler_cb() state gap handling client connections are closed unconditionally. There should not be any reason for this as client connections will be closed if SST really happens. In case of IST connections can stay open.

Corresponding code:

    WSREP_WARN("Gap in state sequence. Need state transfer.");

    /* After that wsrep will call wsrep_sst_prepare. */
    /* keep ready flag 0 until we receive the snapshot */
    wsrep_ready_set(FALSE);

    /* Close client connections to ensure that they don't interfere
     * with SST */
    WSREP_DEBUG("[debug]: closing client connections for PRIM");
    wsrep_close_client_connections(TRUE);

Update: Connections must closed, or at least all ongoing transactions must be aborted, for mysqldump SST.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Agree,

a) This also breaks wsrep_sst_donor_rejects_queries since even with that ON, client connections are closed.

b) Client connections are closed even otherwise in sst_reject_queries (called by wsrep_sst_donate_cb). However, in that it is " wsrep_close_client_connections(TRUE);".

Next, the questions before removing the above wsrep_close_client_connections:

a) Is IST fully conformable to a heavy DML load running in parallel. (since, I presume there are no MDL locks held during IST)

b) Do we now need wsrep_close_client_connections(TRUE) in wsrep_reject_queries than wsrep_close_client_connections(FALSE); since otherwise open client connections may overlap with SST.

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

b) should be fine since SST has FTWRL and by default wsrep_sst_donor_rejects_queries is off. Regarding a) I presume IST allows client connections at some stage so should be fine as well?

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

"a) This also breaks wsrep_sst_donor_rejects_queries since even with that ON, client connections are closed."

s/ON/OFF/

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Ignore the wsrep_reject_queries part, this shouldn't affect the donor
from it looks like. Only the joiner should be affected when it is doing
IST/SST, moreso in IST.

description: updated
Revision history for this message
Teemu Ollakka (teemu-ollakka) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1543

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.