Details

    Description

      Slave configured with GTID crashed because of :

      2019-11-11 21:29:23 9291 [ERROR] Slave SQL: Could not execute Update_rows_v1 event on table magazine.user_master; Duplicate entry '711407' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.065811, end_log_pos 441166884, Gtid 0-122-179115583, Internal MariaDB error code: 1062
      2019-11-11 21:29:23 9291 [Warning] Slave: Duplicate entry '711407' for key 'PRIMARY' Error_code: 1062
      2019-11-11 21:29:23 9291 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.065811' position 441165623; GTID position '0-122-179115582'
      2019-11-11 21:29:23 9291 [Note] Slave SQL thread exiting, replication stopped in log 'mysql-bin.065811' at position 441165623; GTID position '0-122-179115582'

      The slave is read only, with 2 accounts root and user for replication. Binlog format is row for master and log.
      After checking master binary log i found this:

      UPDATE `user_master` SET `delivery_method` = 3 WHERE `num` = 711407 GTID 0-122-179115579
      UPDATE `user_master` SET `delivery_method` = 10 WHERE `num` = 711407 GTID 0-122-179115580
      UPDATE `user_master` SET `delivery_method` = 3 WHERE `num` = 711407 GTID 0-122-179115581
      UPDATE `user_master` SET `delivery_method` = 10 WHERE `num` = 711407 GTID 0-122-179115582
      UPDATE `user_master` SET `delivery_method` = 3 WHERE `num` = 711407 GTID 0-122-179115583

      Where to start investigating this ? At what to look for this situations ?

      Attachments

        Activity

          alice Alice Sherepa added a comment -

          Could you please add your configuration files and error log. This could be related to MDEV-20605, but maybe not, that bug wasn't repeatable with row format.

          alice Alice Sherepa added a comment - Could you please add your configuration files and error log. This could be related to MDEV-20605 , but maybe not, that bug wasn't repeatable with row format.
          cata06 Catalin Dumitriu added a comment - - edited

          Sorry for late comment, the problem was related to system versioning activated on those tables. Duplicate entry error is in fact related to inserting in history. Setting secure timestamp on slave solved the problem.

          cata06 Catalin Dumitriu added a comment - - edited Sorry for late comment, the problem was related to system versioning activated on those tables. Duplicate entry error is in fact related to inserting in history. Setting secure timestamp on slave solved the problem.

          People

            Unassigned Unassigned
            cata06 Catalin Dumitriu
            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.