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

Jason J. W. Williams jasonjwwilliams at gmail.com
Mon Feb 26 23:17:49 UTC 2007


Hi Norbert,

That's pretty nasty transaction-dumb behavior. Is that because
PowerDNS treats the MySQL driver as just an abstracted storage engine?
PDNS if its going to use transaction-safe databases, should create a
transaction abstraction layer that gets enforced when using an ACID
environment like InnoDB or Postgres.

-J

On 2/26/07, Norbert Sendetzky <norbert at linuxnetworks.de> wrote:
> 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.
>
>
> Norbert
> --
> OpenPGP public key
> http://www.linuxnetworks.de/norbert.pubkey.asc
>
>
>


More information about the Pdns-users mailing list