Extended session command support to cover COM_CHANGE_USER, and COM_INIT_DB.
This implementation doesn't guarantee execution order between session commands and queries if other backend server lags behind in session command execution. In poll.c : moved processing of EPOLLERR and EPOLLHUP after processing of EPOLLIN and EPOLLOUT. This ensures that COM_QUIT messages are read and routed forward before signals arrive (from local client/backend).
This commit is contained in:
@ -698,8 +698,7 @@ dcb_write(DCB *dcb, GWBUF *queue)
|
||||
dcb->fd)));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
spinlock_acquire(&dcb->writeqlock);
|
||||
|
||||
if (dcb->writeq != NULL)
|
||||
@ -809,9 +808,9 @@ dcb_write(DCB *dcb, GWBUF *queue)
|
||||
pthread_self(),
|
||||
w,
|
||||
dcb,
|
||||
STRDCBSTATE(dcb->state),
|
||||
STRDCBSTATE(dcb->state),
|
||||
dcb->fd)));
|
||||
}
|
||||
} /*< while (queue != NULL) */
|
||||
/*<
|
||||
* What wasn't successfully written is stored to write queue
|
||||
* for suspended write.
|
||||
@ -829,7 +828,6 @@ dcb_write(DCB *dcb, GWBUF *queue)
|
||||
saved_errno != EAGAIN &&
|
||||
saved_errno != EWOULDBLOCK)
|
||||
{
|
||||
queue = gwbuf_consume(queue, gwbuf_length(queue));
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Error : Writing to %s socket failed due %d, %s.",
|
||||
|
Reference in New Issue
Block a user