Unix Technical Forum

2PC on master-slave with replication

This is a discussion on 2PC on master-slave with replication within the MySQL General forum forums, part of the MySQL category; --> Hi, Is it possible to have a transaction with an update statement pointed to the master and a select ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 06:47 AM
Darpan Dinker
 
Posts: n/a
Default 2PC on master-slave with replication

Hi,
Is it possible to have a transaction with an update statement pointed to
the master and a select statement pointed to the slave. If the isolation
level of this transaction is REPEATABLE_READ or SERIALIZABLE, will a
commit involve 2PC?
Thanks,
Darpan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 06:48 AM
Rick James
 
Posts: n/a
Default RE: 2PC on master-slave with replication

No.

Transactions involve only one machine.

Furthermore, writing to the master and then reading from a slave runs the
risk of replication delays. Granted, delays are usually sub-second, but if
something big goes thru replication, it can get behind. Your application
should understand the delay and either live with or code around it -- such
as going to the master for things (eg your transaction) that must be
consistent. Leave the bulk of reads for slaves.

> -----Original Message-----
> From: Darpan Dinker [mailto:darpandinker@gmail.com]
> Sent: Tuesday, July 10, 2007 12:37 AM
> To: mysql@lists.mysql.com; replication@lists.mysql.com
> Subject: 2PC on master-slave with replication
>
> Hi,
> Is it possible to have a transaction with an update statement
> pointed to
> the master and a select statement pointed to the slave. If
> the isolation
> level of this transaction is REPEATABLE_READ or SERIALIZABLE, will a
> commit involve 2PC?
> Thanks,
> Darpan
>
> --
> MySQL Replication Mailing List
> For list archives: http://lists.mysql.com/replication
> To unsubscribe:
> http://lists.mysql.com/replication?u...@yahoo-inc.com
>
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:59 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com