Fix transaction replay timeout
The timeout would not be triggered due to the fact that the delayed_retry_timeout wasn't inspected.
This commit is contained in:
parent
7bf5c07835
commit
842f9f1d15
@ -330,7 +330,7 @@ bool RWSplitSession::route_single_stmt(GWBUF* querybuf)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (can_retry_query() || m_is_replay_active)
|
||||
else if (can_retry_query() || can_continue_trx_replay())
|
||||
{
|
||||
retry_query(gwbuf_clone(querybuf));
|
||||
succp = true;
|
||||
|
@ -270,6 +270,12 @@ private:
|
||||
&& !session_trx_is_active(m_client->session);
|
||||
}
|
||||
|
||||
// Whether a transaction replay can remain active
|
||||
inline bool can_continue_trx_replay() const
|
||||
{
|
||||
return m_is_replay_active && m_retry_duration < m_config.delayed_retry_timeout;
|
||||
}
|
||||
|
||||
inline bool can_recover_servers() const
|
||||
{
|
||||
return !m_config.disable_sescmd_history || m_recv_sescmd == 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user