MXS-2564: Reconnect only when necessary
By doing the reconnection only when a new query arrives, we prevent the excessive reconnecting that is done when a server's actual and monitored states are in conflict.
This commit is contained in:
@ -293,6 +293,14 @@ private:
|
||||
return !m_config.disable_sescmd_history || m_recv_sescmd == 0;
|
||||
}
|
||||
|
||||
inline bool have_open_connections() const
|
||||
{
|
||||
return std::any_of(
|
||||
m_backends.begin(), m_backends.end(), [](const mxs::SRWBackend& b) {
|
||||
return b->in_use();
|
||||
});
|
||||
}
|
||||
|
||||
inline bool is_large_query(GWBUF* buf)
|
||||
{
|
||||
uint32_t buflen = gwbuf_length(buf);
|
||||
|
||||
Reference in New Issue
Block a user