"Duplicate entry" Replication Errors using pt-heartbeat with HA Systems

116 views
Skip to first unread message

MarkW

unread,
May 25, 2012, 11:01:31 AM5/25/12
to Percona Discussion
Hi,
I am using pt-heartbeat with MySQL that is configured in a HA setup.

LoadBalancer(VIP)
|
M1(RW)<--->M2(RW)

|
+----+----+
S1(R) S2(R)

I am using pt-heartbeat version 1.0.1

I send out a heartbeat every two minutes to the active writer via cron
to the load balancer Virtual IP Address.

*/2 * * * * /usr/bin/pt-heartbeat -D test --update --replace --create-
table -h LBVIP -P LBPORT --run-time 1

When I do a failover I get duplicate key errors on the secondary
master M2. On failback i get duplicate key error on Master M1.


Last_Error: Error 'Duplicate entry '8806' for key 'PRIMARY'' on query.
Default database: 'test'. Query: 'INSERT INTO `test`.`heartbeat`
(server_id, ts) VALUES ('8806', NOW())'

I am using the --update --replace options but i believe based on my
replication errors that it is doing an insert not a replace.

Am i hitting a bug with pt-heartbeat or do i have to change my method
of sending heartbeat?

Thanks,
MarkW

Baron Schwartz

unread,
May 25, 2012, 11:16:27 AM5/25/12
to percona-d...@googlegroups.com
That sounds like a bug. Please file a bug report on launchpad.net/percona-toolkit and we can work through it there.

- Baron
> --
> You received this message because you are subscribed to the Google Groups "Percona Discussion" group.
> To post to this group, send email to percona-d...@googlegroups.com.
> To unsubscribe from this group, send email to percona-discuss...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/percona-discussion?hl=en.
>

--
Chief Performance Architect at Percona <http://www.percona.com/>
+1 (888) 401-3401 x507
Calendar: <https://tungle.me/percona_baron>
Percona Live New York, Oct 1-2 <http://www.percona.com/live>

MarkW

unread,
May 25, 2012, 12:08:07 PM5/25/12
to Percona Discussion
Bug Filed.

https://bugs.launchpad.net/percona-toolkit/+bug/1004567

Thanks,
-MarkW
> > For more options, visit this group athttp://groups.google.com/group/percona-discussion?hl=en.
Reply all
Reply to author
Forward
0 new messages