Use references instead of copies of SRWBackend
As the DCB passed as the clientReply parameter is guaranteed to match one of the DCBs in the RWBackends. By using a reference, the need to copy a shared_ptr is removed (along with the atomic operation that it implies) thus reducing the overhead in the clientReply and the functions it uses.
This commit is contained in:

committed by
Johan Wikman

parent
a6eeed98fe
commit
ecb56ef540
@ -291,7 +291,7 @@ void closed_session_reply(GWBUF *querybuf)
|
||||
* @param buffer Query buffer containing reply data
|
||||
* @param backend Router session data for a backend server
|
||||
*/
|
||||
void check_session_command_reply(GWBUF *buffer, SRWBackend backend)
|
||||
void check_session_command_reply(GWBUF *buffer, SRWBackend& backend)
|
||||
{
|
||||
if (MYSQL_IS_ERROR_PACKET(((uint8_t *)GWBUF_DATA(buffer))))
|
||||
{
|
||||
|
Reference in New Issue
Block a user