dcb.c:dcb_write accept also dcb state DCB_STATE_NOPOLLING since it only means that dcb has been removed from epoll set but it is still possible to write to it. Bug #384 http://bugs.skysql.com/show_bug.cgi?id=384 session.h:added new state for SESSION, SESSION_STATE_ROUTER_READY which follows SESSION_STATE_READY. The difference is that ROUTER_READY is set only after router session is successfully created while READY means that session still lacks router. session.c:set SESSION_STATE_ROUTER_READY when router is created. mysql_backend.c:gw_read_backend_event, added SESSION_STATE_ROUTER_READY check before router session is closed. Changed chec kso that it doesn't block in infinite loop (although it shouldn't be possible anyway). mysql_backend.c:gw_error_backend_event, added similar check before session is closed.
This commit is contained in:
@ -315,7 +315,6 @@ static void* newSession(
|
||||
client_rses->master_dcb = dcb_connect(be_master->backend_server,
|
||||
session,
|
||||
be_master->backend_server->protocol);
|
||||
|
||||
if (client_rses->master_dcb == NULL)
|
||||
{
|
||||
/** Close slave connection first. */
|
||||
@ -543,7 +542,7 @@ static int routeQuery(
|
||||
|
||||
if (rses_is_closed || (master_dcb == NULL && slave_dcb == NULL))
|
||||
{
|
||||
LOGIF(LE, (skygw_log_write(
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error: Failed to route %s:%s:\"%s\" to backend server. "
|
||||
"%s.",
|
||||
|
Reference in New Issue
Block a user