Track session state only when required
The protocol should not track the session state as the parsing is quite expensive with the current code. This change is a workaround that enables the parsing only when required. A proper way to handle this would be to do all the response processing in one place thus avoiding the duplication of work.
This commit is contained in:
@ -280,6 +280,11 @@ bool RWSplitSession::route_single_stmt(GWBUF* querybuf)
|
||||
}
|
||||
else if (TARGET_IS_MASTER(route_target))
|
||||
{
|
||||
if (m_config.causal_reads)
|
||||
{
|
||||
gwbuf_set_type(querybuf, GWBUF_TYPE_TRACK_STATE);
|
||||
}
|
||||
|
||||
succp = handle_master_is_target(&target);
|
||||
|
||||
if (!succp && should_migrate_trx(target))
|
||||
|
||||
Reference in New Issue
Block a user