List:Internals« Previous MessageNext Message »
From:Sasha Pachev Date:April 28 2001 7:15pm
Subject:Re: Replication and transactions (Feature Request)
View as plain text  
On Saturday 28 April 2001 07:49, Thomas Stinner wrote:
> Hello,
> 
> if you currently use transactions with replication, the transaction is
> written to the binary log after the commit. 
> 
> This is okay, however the slave seems to use autocommit and therefore
> runs a transaction for every single statement. 
> 
> This is a problem if you have a lot of statements within a single
> transaction, because the slave needs a lot lot more time to work on this
> transaction.
> 
> We made a (very simple) benchmark by inserting 10000 records into a bdb
> table consisting of an int field (used as primary key) and a varchar
> field.
> 
> Within a single transaction it took 2.163sec.
> Using Autocommit it took 2m56.299sec. !!!!
> 
> We often import data from external sources and have the problem that the
> slave takes a long time to catchup with the master.
> 
> It shouldn't be to hard to replicate hole transactions (just sending a
> begin in front and a commit at the end?)

The above is a bug. Slave should not auto-commit if the master does not. We 
will investigate this and fix it, if we can find the problem in the code or 
repeat it quickly ourselves. If not, we will ask you for a test case.

-- 
MySQL Development Team
   __  ___     ___ ____  __ 
  /  |/  /_ __/ __/ __ \/ /   Sasha Pachev <sasha@stripped>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Provo, Utah, USA
       <___/                  
Thread
Replication and transactions (Feature Request)Thomas Stinner28 Apr
  • Re: Replication and transactions (Feature Request)Sasha Pachev28 Apr