Add more error logging to DCB handling
If an illegal DCB close is done with a backend DCB, it will log the server where it was connected. This allows us to know whether the DCB was connected to a master or a slave. Added more debug assertions to readwritesplit code. The DCBs should never enter the DCB_STATE_DISCONNECTED. Removed useless debug log messages. The messages usually just flood the logs with no use to the developers.
This commit is contained in:
@ -1096,7 +1096,8 @@ static bool get_dcb(DCB **p_dcb, ROUTER_CLIENT_SES *rses, backend_type_t btype,
|
||||
{
|
||||
*p_dcb = backend_ref[i].bref_dcb;
|
||||
succp = true;
|
||||
ss_dassert(backend_ref[i].bref_dcb->state != DCB_STATE_ZOMBIE);
|
||||
ss_dassert(backend_ref[i].bref_dcb->state != DCB_STATE_ZOMBIE ||
|
||||
backend_ref[i].bref_dcb->state != DCB_STATE_DISCONNECTED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1228,7 +1229,8 @@ static bool get_dcb(DCB **p_dcb, ROUTER_CLIENT_SES *rses, backend_type_t btype,
|
||||
*p_dcb = master_bref->bref_dcb;
|
||||
succp = true;
|
||||
/** if bref is in use DCB should not be closed */
|
||||
ss_dassert(master_bref->bref_dcb->state != DCB_STATE_ZOMBIE);
|
||||
ss_dassert(master_bref->bref_dcb->state != DCB_STATE_ZOMBIE ||
|
||||
master_bref->bref_dcb->state != DCB_STATE_DISCONNECTED);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user