[MDEV-8907] Spider AUTO_INCREMENT can return an unexpected '1' value that produces a DUPLICATE KEY error Created: 2015-10-06  Updated: 2018-07-17  Resolved: 2018-07-17

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.0.19
Fix Version/s: 10.3.3

Type: Bug Priority: Major
Reporter: Sandrine Chirokoff Assignee: Jacob Mathew (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

spider_version 3.2.21,
MariaDB Server 10.0.19-MariaDB,
Linux x86_64


Attachments: Text File info.txt     File install_spider_action_event_nodes.sql     File install_spider_node.sql     File install_tokudb_action_event_nodes.sql     File install_tokudb_node.sql     File run_20_20_instances.sh     File run_20_instances.sh    
Issue Links:
Relates
relates to MDEV-7720 Spiral patch 022_mariadb-10.0.15.auto... Closed

 Description   

I tried to reproduce an issue we have on a customer environment.
My goal was to reproduce a LOCK WAIT TIMEOUT when 20 instances insert a row into the same SPIDER/TOKUDB table but I'm not able to reproduce it for the moment. A maximum of 100,000 rows can be inserted each day.

However, I have this issue about some duplicate entry for PRIMARY KEY.
The PRIMARY KEY is composed by an AUTO-INCREMENT and a date and after 24000 insertions, the process failed several time with a PRIMARY KEY issue.
I'm able to reproduce it:

  • run the ./run_20_instances (10 on 1 spider node and 10 on the other)
  • wait about 30000 insertions

I updated the script to reproduce the queries flow from our tools on 2 tables, one is use to organize a list of actions, the other is use to log each events from the process of the action. So one is use as a PULL/PUSH table and the other receive new lines.
With this script, I'm able to reproduce a TIMEOUT (and also Duplicate key) on a Spider system but not on a TokuDb system.

  • run the ./run_20_20_instances
  • wait about 30000 insertions

I don't think this issues are linked to my issue because I can't reproduce it without a Spider system but it shows that the SPIDER engine can be instable.



 Comments   
Comment by Sandrine Chirokoff [ 2015-10-06 ]
Variable_name Value
innodb_version 5.6.23-72.1
protocol_version 10
slave_type_conversions  
spider_version 3.2.21
version 10.0.19-MariaDB-log
version_comment MariaDB Server
version_compile_machine x86_64
version_compile_os Linux
version_malloc_library bundled jemalloc
Comment by Jacob Mathew (Inactive) [ 2018-07-17 ]

The fix for this Spider AUTO_INCREMENT duplicate key bug was implemented as part of MDEV-7720 for Spiral patch 022 and released in MariaDB Server 10.3.3.

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