[Dbix-class] Master/Slave Replication (again)

J. Shirley jshirley at gmail.com
Thu Jan 10 04:22:58 GMT 2008


On Jan 9, 2008 6:16 AM, Aaron Trevena <aaron.trevena at gmail.com> wrote:

> Hi All,
>
> Back in october there was some discussion of handling replication -
> and as with Bert and other's situations, I need to be able to specify
> when to user master/slave per query (or per method/function) due to
> replication lag.
>
> I didn't spot any mention of this in the Changelog - and Bert
> mentioned he needed it, so has any progress been made, or is there a
> workaround/manual way of doing it?
>
> Cheers,
>
> A.
>

Hey Aaron,

My thoughts on this, which were never implemented but it's a pretty trivial
thing to do, is that if you are inside of a transaction (look at transaction
depth) then to use the write source.  Other options that were proposed where
to have a "timeout" period where the read source is mapped to the write
source.

I tend to just think that transactions are the way to go, and to keep things
sane that way but I do understand that you can't always code that way in
existing systems.

I'm happy to act as a sounding board, but no longer at the job that I was at
when I was trying to solve this issue and have since picked up other higher
priority tasks.

-J

-- =

J. Shirley :: jshirley at gmail.com :: Killing two stones with one bird...
http://www.toeat.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080109/d38=
fd26e/attachment-0001.htm


More information about the DBIx-Class mailing list