Skip to content

Commit

Permalink
Merge pull request #165 from aiven/packi-ignore-right-error-code
Browse files Browse the repository at this point in the history
Fix typo in error code for duplicate entry
  • Loading branch information
alexole authored Jul 17, 2023
2 parents 15d3ac9 + 750a798 commit 3b1099c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions myhoard/restore_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,10 @@ def rebuild_tables(self) -> None:
try:
cursor.execute(f"ALTER TABLE {escaped_table_designator} FORCE")
except pymysql.err.IntegrityError as e:
# ERROR 1026: Duplicate entry
# ERROR 1062: Duplicate entry
# This happens for tables that had temporary duplicate rows in different transactions, we can't rebuild
# those at the moment.
if e.args[0] == 1026:
if e.args[0] == 1062:
self.log.error("Could not rebuild %s, error: %s, skipping it", escaped_table_designator, str(e))
else:
raise
Expand Down

0 comments on commit 3b1099c

Please sign in to comment.