[Pdns-users] MySQL-Reconnecting with MySQL >5.0.3

Norbert Sendetzky norbert at linuxnetworks.de
Mon Feb 26 23:13:47 UTC 2007

On Monday 26 February 2007 23:55, Kenneth Marshall wrote:
> On Mon, Feb 26, 2007 at 03:37:58PM -0700, Jason J. W. Williams wrote:
> > It would be nice to have a config file option to enable/disable it. In
> > our environment, there are no zone transfers going on, and its more
> > important to reconnect to maximize uptime. Also, PowerDNS should
> > handle rollbacks properly if its going to support InnoDB. In the event
> > of a rollback, either the entire transfer should be re-applied or
> > dropped depending on your point of view.
> >
> > >Auto-reconnect is very dangerous while doing an AXFR transfer because it
> > >rolls
> > >back the transaction and reenables auto-commit mode. This may leave your
> > >zone
> > >in a state where the first half of the records are missing (when a slave
> > >updates it's zone).
> I thought that the zone AXFR's occur is a transaction. In that case, when
> a rollback occurs the DB is in the state that it was before the AXFR was
> attempted, including the serial number. Why would half of the records be
> suddenly missing?

If you read the MySQL doc they give you the reason why this can happen:
The AXFR transfer will start a transaction, delete the records and start 
feeding in the the new ones. If an auto-reconnect occurs, the transaction and 
all changes so far are rolled back and the connection settings are reset to 
auto-commit. Unfortunately, PowerDNS doesn't notice this and thinks it's 
still in the transaction and continues to feed in records. This means that 
(contrary to my first thought) all records are still present but outstanding 
records are still feed in by PowerDNS. Therefore, you will have duplicate 
entries in your records table.

OpenPGP public key

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20070227/893c7fb2/attachment-0001.sig>

More information about the Pdns-users mailing list