[MDEV-7129] Galera duplicate error on autoincrement field primary key Created: 2014-11-18  Updated: 2015-10-23  Resolved: 2015-01-07

Status: Closed
Project: MariaDB Server
Component/s: Galera, Galera Arbitrator garbd
Affects Version/s: 5.5.40-galera, 10.0.14-galera
Fix Version/s: 5.5.42-galera, 10.0.16-galera

Type: Bug Priority: Major
Reporter: Stoykov (Inactive) Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 0
Labels: galera
Environment:

RHEL Linux 2.6.32-431.11.2.el6.x86_64


Attachments: Text File CreateTable_transaction.txt     Text File CreateTable_vbintegrationlogmerchant.txt     File mysql_tail.log     Text File node1.vars.tckt.8316.txt    
Issue Links:
PartOf
is part of MDEV-7123 MariaDB 10.0.14 Galera node shutdown ... Closed

 Description   

The Galera cluster consists of 2 data nodes and one Galera Arbitrator.
After the second node failure, the cluster consists of one alive node and garbd instance and Duplicate error started to be received by the application:

MySql.Data.MySqlClient.MySqlException Duplicate entry '300347006487' for key 'PRIMARY



 Comments   
Comment by Nirbhay Choubey (Inactive) [ 2014-11-18 ]

https://bugs.launchpad.net/percona-xtradb-cluster/+bug/1366997

Comment by Nirbhay Choubey (Inactive) [ 2014-11-18 ]

Can you also share the table structure (SHOW CREATE TABLE ... ) ?

Comment by Stoykov (Inactive) [ 2014-11-19 ]

two files attached with the create table where Primary key error was reported:
CreateTable_transaction.txt
CreateTable_vbintegrationlogmerchant.txt

BR,

Comment by Seppo Jaakola [ 2014-11-21 ]

This bug is being worked in upstream bug tracker: https://github.com/codership/mysql-wsrep/issues/18

Comment by Seppo Jaakola [ 2014-11-21 ]

For autocommit inserts, there is a potential workaround by configuring:
wsrep_drupal_282555_workaround = ON
wsrep_retry_autocommit= < reasonably large value, in my test 10 is enough to prevent dupkey errors >

With this configuration, mysql server will silently retry an autocommit insert that would fail for duplicate key error. Max retry count can be controlled with wsrep_retry_autocommit limit.

Comment by Nirbhay Choubey (Inactive) [ 2015-01-07 ]

http://bazaar.launchpad.net/~maria-captains/maria/maria-10.0-galera/revision/3911

Comment by Nirbhay Choubey (Inactive) [ 2015-01-08 ]

http://bazaar.launchpad.net/~maria-captains/maria/maria-5.5-galera/revision/3552

Comment by Claudio Nanni [ 2015-10-23 ]

Hi,
Still happening on 10.0.20, especially on fresh startup.

Generated at Thu Feb 08 07:17:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.