0

I have lost my slave. To restore it I have locked tables on the master host and then have created a dump using mydumper tool. After that I have tried to restore my slave using myloader tool but during the restoration process I´ve got one critical error:

** (myloader:190XXXX): WARNING **: 18:28:15.810: Thread 1: Error restoring 1: Duplicate entry 'ТОБXX' for key 'UX_B_SEARCH_STEM'

** (myloader:190XXXX): WARNING **: 18:28:15.810: Thread 1: Retrying last failed executed statement
** Message: 18:28:15.958: Thread 3: restoring `egats_tixmi`.`b_search_stem` part 1 of 1 from egats_tixmi.b_search_stem.00000.sql. Progress 113 of 488. Tables 0 of 1263 completed

** (myloader:190XXXX): CRITICAL **: 18:28:19.072: Thread 1: Error restoring: Duplicate entry 'ТОБXX' for key 'UX_B_SEARCH_STEM'

** (myloader:190XXXX): CRITICAL **: 18:28:19.072: Error occurs between lines: 4 and 7798 on file tixmi.b_search_stem.00000.sql: Duplicate entry 'ТОБXX' for key 'UX_B_SEARCH_STEM'

** (myloader:190XXXX): CRITICAL **: 18:28:18.070: Thread 1: issue restoring tixmi.b_search_stem.00000.sql:

How critical is that? Right now my slave working without any issues but looks like the data identity between master and slave couldn't be 100% guaranteed. What would be the best strategy to be sure that all is good without repeating the whole restoration process?

1 Answer 1

0

A previous (now fixed bug) MDEV-31120 may have affected your backups.

I recommend restoring to a version equal or later than the fixVersion in bug report (10.6.15, 10.9.8, 10.10.6, 10.11.5).

You might have duplicates in your master. If you had a mydumper with '--insert-ignore' or using sed changed INSERT to INSERT IGNORE.

This is however leaving it to chance as to which entry is duplicate.

I recommend:

  1. getting the replica to a newer version than the above
  2. set global unique_checks=0
  3. restoring the data with myloader
  4. identifying a strategy resolve the duplicate entries (removing oldest, merging), something. depends on data without applying it on the replica.
  5. if the master isn't of a sufficiently new version update it.
  6. start replication
  7. apply the duplicate removing strategy on the master
  8. after replication caught up, set global unique_checks=1 on replica.

Confirmation/sanity check of this by another person much appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.