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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| ||||
| 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 > > |