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

          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.

          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?

          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

          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

          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

          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.