Handle batched reads from cloned sessions
Readwritesplit should route all queries from cloned sessions to the master. This allows batch statements to be safely routed. Native readwritesplit sessions only support batched writes as batched reads aren't very common. Once readwritesplit supports batched reads, the special handling for cloned DCBs can be removed.
This commit is contained in:
@ -696,6 +696,13 @@ route_target_t get_route_target(ROUTER_CLIENT_SES *rses,
|
||||
{
|
||||
target = TARGET_MASTER;
|
||||
}
|
||||
/**
|
||||
* A cloned session, route everything to the master
|
||||
*/
|
||||
else if (DCB_IS_CLONE(rses->client_dcb))
|
||||
{
|
||||
target = TARGET_MASTER;
|
||||
}
|
||||
/**
|
||||
* These queries are not affected by hints
|
||||
*/
|
||||
|
Reference in New Issue
Block a user