Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8907

Spider AUTO_INCREMENT can return an unexpected '1' value that produces a DUPLICATE KEY error

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.19
    • 10.3.3
    • None
    • spider_version 3.2.21,
      MariaDB Server 10.0.19-MariaDB,
      Linux x86_64

    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.

      Attachments

        1. info.txt
          451 kB
        2. install_spider_action_event_nodes.sql
          17 kB
        3. install_spider_node.sql
          5 kB
        4. install_tokudb_action_event_nodes.sql
          3 kB
        5. install_tokudb_node.sql
          2 kB
        6. run_20_20_instances.sh
          2 kB
        7. run_20_instances.sh
          1 kB

        Issue Links

          Activity

            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
            sandrine.chirokoff Sandrine Chirokoff added a comment - 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

            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.

            jacob-mathew Jacob Mathew (Inactive) added a comment - 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.

            People

              jacob-mathew Jacob Mathew (Inactive)
              sandrine.chirokoff Sandrine Chirokoff
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.