Router spinlock wasn't used to protect routing. As a consequence router could have been closed in thread #1 while thread #2 was in a middle of execution of router code. Solved by holding router lock so that it covered whole routing operation.

This commit is contained in:
VilhoRaatikka
2014-05-28 18:29:02 +03:00
parent a73c9c8076
commit 1a2b8e5475
2 changed files with 26 additions and 18 deletions

View File

@ -585,7 +585,8 @@ gw_MySQLWrite_backend(DCB *dcb, GWBUF *queue)
snprintf(str, len+1, "%s", startpoint);
LOGIF(LE, (skygw_log_write_flush(
LOGFILE_ERROR,
"Error : Authentication to backend failed.")));
"Error : Unable to write to backend due to "
"authentication failure.")));
/** Consume query buffer */
while ((queue = gwbuf_consume(
queue,