readwritesplit.c: prevent switching the master during session. Added logging to cases where master has changed.

Moved DCB's member errhandle_called behing DEBUG flags to Release build. It shows if handleError is called for a DCB and makes it possible to avoid redundant calls.
This commit is contained in:
VilhoRaatikka
2014-11-10 14:15:32 +02:00
parent 3b07449daa
commit 62270412cf
4 changed files with 77 additions and 57 deletions

View File

@ -828,6 +828,17 @@ static void handleError(
SESSION *session = backend_dcb->session;
session_state_t sesstate;
/** Don't handle same error twice on same DCB */
if (backend_dcb->dcb_errhandle_called)
{
/** we optimistically assume that previous call succeed */
*succp = true;
return;
}
else
{
backend_dcb->dcb_errhandle_called = true;
}
spinlock_acquire(&session->ses_lock);
sesstate = session->state;
client_dcb = session->client;