Added spinlock protection for the session association to the DCB and
reworked the reference count mechanism on the session. Introduced a FREE state for the session and alter the session destruction flow so that we only remove the session when all the DCB's have singled they have finished processing events for the DCB rather than when the first thread decides to clsoe the DCB.
This commit is contained in:
@ -588,7 +588,6 @@ int gw_read_client_event(DCB* dcb) {
|
||||
//write to client mysql AUTH_OK packet, packet n. is 2
|
||||
// start a new session, and connect to backends
|
||||
session = session_alloc(dcb->service, dcb);
|
||||
atomic_add(&dcb->session->refcount, 1);
|
||||
CHK_SESSION(session);
|
||||
ss_dassert(session->state != SESSION_STATE_ALLOC);
|
||||
protocol->state = MYSQL_IDLE;
|
||||
|
||||
Reference in New Issue
Block a user