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

Spiral patch 004_mariadb-10.0.15.slave-trx-retry.diff

Details

    Description

      Description:
      This patch is for retrying trunsaction when slave sql thread get error number which setted to parameter.
      Background:
      Before applying this patch, slave sql thread is stopped when Spider connection is broken at updating by sql thread. So I made it for retrying transaction. But this feature is designed for general purpos
      +e.
      Paramater setting example:
      slave_transaction_retry_errors=1158,1159,2013,12701
      slave_transaction_retry_interval=10

      Attachments

        Activity

          svoj Sergey Vojtovich created issue -
          svoj Sergey Vojtovich made changes -
          Field Original Value New Value
          Epic Link MDEV-7698 [ 50410 ]
          svoj Sergey Vojtovich made changes -
          Assignee Kristian Nielsen [ knielsen ]

          Kristian, please review and apply attached patch. If you disagree with this patch or need any feedback from contributor, please post your comments here and set status to stalled.

          svoj Sergey Vojtovich added a comment - Kristian, please review and apply attached patch. If you disagree with this patch or need any feedback from contributor, please post your comments here and set status to stalled.
          serg Sergei Golubchik made changes -
          Fix Version/s 10.1 [ 16100 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 60029 ] MariaDB v3 [ 66990 ]
          svoj Sergey Vojtovich made changes -
          Description Description:
            This patch is for retrying trunsaction when slave sql thread get error number which setted to parameter.
          Background:
            Before applying this patch, slave sql thread is stopped when Spider connection is broken at updating by sql thread. So I made it for retrying transaction. But this feature is designed for general purpos
          +e.
          Paramater setting example:
            slave_transaction_retry_errors=1158,1159,2013,12701
            slave_transaction_retry_interval=10
          serg Sergei Golubchik made changes -
          Fix Version/s 10.1 [ 16100 ]
          alvinr Alvin Richards (Inactive) made changes -
          Labels NRE-305367

          It would be good to know which are the common error numbers that one would need to use with slave_transaction_retry_error when using Spider. This is needed when we document Spider and also as a recommendation when configuring MariaDB with
          Spider usage.

          Kentoku, do you have any suggestions for the error numbers that one should use?

          monty Michael Widenius added a comment - It would be good to know which are the common error numbers that one would need to use with slave_transaction_retry_error when using Spider. This is needed when we document Spider and also as a recommendation when configuring MariaDB with Spider usage. Kentoku, do you have any suggestions for the error numbers that one should use?
          monty Michael Widenius made changes -
          Assignee Kristian Nielsen [ knielsen ] Michael Widenius [ monty ]
          monty Michael Widenius made changes -
          Status Open [ 1 ] In Progress [ 3 ]

          I suggest the following errors.
          1158: Got an error reading communication packets
          1159: Got timeout reading communication packets
          1160: Got an error writing communication packets
          1161: Got timeout writing communication packets
          2013: Lost connection to MySQL server during query
          12701: Remote MySQL server has gone away

          Kentoku Kentoku Shiba (Inactive) added a comment - I suggest the following errors. 1158: Got an error reading communication packets 1159: Got timeout reading communication packets 1160: Got an error writing communication packets 1161: Got timeout writing communication packets 2013: Lost connection to MySQL server during query 12701: Remote MySQL server has gone away
          alvinr Alvin Richards (Inactive) made changes -
          NRE Projects NRE-305367
          alvinr Alvin Richards (Inactive) made changes -
          Labels NRE-305367
          dthompson David Thompson (Inactive) made changes -
          Labels spiral_p04

          Pushed into bb-10.2-spider

          Here is the commit comment:

          This is about adding more options to force slave retries

          Two new variables has been added:
          slave_transaction_retry_errors

          • Tells the slave thread to retry transaction for replication when a
            query event returns an error from the provided list. Deadlock and
            elapsed lock wait timeout errors are automatically added to this list
            slave-transaction-retry-interval
          • Interval of the slave SQL thread will retry a transaction
            in case it failed with a deadlock or elapsed lock wait
            timeout or listed in slave_transaction_retry_errors

          Other changes:

          • Simplified code for slave_skip_errors (to be aligned with
            slave_transaction_retry_errors)
          • Renamed print_slave_skip_errors() to make_slave_skip_errors_printable()
          • Remove printing error from init_slave_skip_errors as my_bitmap_init()
            will do that if needed.
          • Generalize has_temporary_error()
          monty Michael Widenius added a comment - Pushed into bb-10.2-spider Here is the commit comment: This is about adding more options to force slave retries Two new variables has been added: slave_transaction_retry_errors Tells the slave thread to retry transaction for replication when a query event returns an error from the provided list. Deadlock and elapsed lock wait timeout errors are automatically added to this list slave-transaction-retry-interval Interval of the slave SQL thread will retry a transaction in case it failed with a deadlock or elapsed lock wait timeout or listed in slave_transaction_retry_errors Other changes: Simplified code for slave_skip_errors (to be aligned with slave_transaction_retry_errors) Renamed print_slave_skip_errors() to make_slave_skip_errors_printable() Remove printing error from init_slave_skip_errors as my_bitmap_init() will do that if needed. Generalize has_temporary_error()

          Cleaned up and pushed into bb-10.2-spider

          monty Michael Widenius added a comment - Cleaned up and pushed into bb-10.2-spider
          monty Michael Widenius made changes -
          issue.field.resolutiondate 2017-11-06 14:14:25.0 2017-11-06 14:14:25.158
          monty Michael Widenius made changes -
          Component/s Storage Engine - Spider [ 10132 ]
          Fix Version/s N/A [ 14700 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]

          The new system variables has been added to the KB

          monty Michael Widenius added a comment - The new system variables has been added to the KB
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 66990 ] MariaDB v4 [ 132536 ]

          People

            monty Michael Widenius
            svoj Sergey Vojtovich
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.