Re: RW not going to server
I have made a change to the code I have commented out the break lines in this section
if s.type == proxy.BACKEND_TYPE_RW and
s.state ~= proxy.BACKEND_STATE_DOWN and
cur_idle < pool.min_idle_connections then
proxy.connection.backend_ndx = i
slave_backend = i
--break
elseif s.type == proxy.BACKEND_TYPE_RO and
s.state ~= proxy.BACKEND_STATE_DOWN and
cur_idle < pool.min_idle_connections then
proxy.connection.backend_ndx = i
--break
elseif s.type == proxy.BACKEND_TYPE_RW and
s.state ~= proxy.BACKEND_STATE_DOWN and
rw_ndx == 0 then
rw_ndx = i
end
It now sends all the select statements to the correct IP and sends all the Update statements to the right IP. The only issue is that when the server is first started when I run insert statements i get this error
network-mysqld-proxy.c.2927: I have no server backend, closing connection
network-mysqld.c.1122: plugin_call(CON_STATE_READ_QUERY) failed
After I run a number of insert statements it seems to go away and works fine.
Subject
Views
Written By
Posted
3760
November 15, 2007 06:57PM
Re: RW not going to server
2392
November 15, 2007 08:40PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.