From 70104f957e8309fd876d013dd006aef30ccb613a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 12 Jun 2018 22:01:54 +0300 Subject: [PATCH] Fix readwritesplit hang when query is queued Readwritesplit would hang when the query execution is postponed due to the fact that the target server is executing a session command. The number of expected responses was incremented when no response was expected. --- server/modules/routing/readwritesplit/rwsplit_route_stmt.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc index 2fc3d5add..123aee722 100644 --- a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc +++ b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc @@ -226,7 +226,6 @@ bool RWSplitSession::route_single_stmt(GWBUF *querybuf) else if (target->has_session_commands()) { // We need to wait until the session commands are executed - m_expected_responses++; m_query_queue = gwbuf_append(m_query_queue, gwbuf_clone(querybuf)); MXS_INFO("Queuing query until '%s' completes session command", target->name()); }