From 552fdcb88a3b8fcdb2be932ba204ca89d468ed04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 18 Mar 2020 16:28:02 +0200 Subject: [PATCH] MXS-2938: Log session command info on routing failure If the session command could not be routed, the log message should contain the actual command that was routed. This makes failure analysis much easier. --- server/modules/routing/readwritesplit/rwsplit_route_stmt.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc index 3691c2396..16995a962 100644 --- a/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc +++ b/server/modules/routing/readwritesplit/rwsplit_route_stmt.cc @@ -620,7 +620,8 @@ bool RWSplitSession::route_session_write(GWBUF* querybuf, uint8_t command, uint3 } else { - MXS_ERROR("Could not route session command: %s. Connection status: %s", + MXS_ERROR("Could not route session command `%s`: %s. Connection status: %s", + sescmd->to_string().c_str(), attempted_write ? "Write to all backends failed" : "All connections have failed", get_verbose_status().c_str()); }