Skip to content

Commit e18c86b

Browse files
MDEV-38041: MariaBackup fails during rollback of inplace FTS alter table
Problem: ======== When an inplace ALTER operation is rolled back, InnoDB drops intermediate tables and their associated FTS internal tables. However, MariaBackup's DDL tracking can incorrectly report this as a backup failure. The issue occurs because backup_set_alter_copy_lock() downgrades the MDL_BACKUP_DDL lock before the inplace phase of ALTER, allowing FTS internal tables to be dropped during the later phases of backup when DDL tracking is still active. Solution: ======== backup_file_op_fail(): Ignore delete operations on FTS internal tables when not using --no-lock option, preventing false positive backup failures.
1 parent cfaaf93 commit e18c86b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

extra/mariabackup/xtrabackup.cc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,19 @@ static void backup_file_op_fail(uint32_t space_id, int type,
10721072
filename_to_spacename(name, len).c_str());
10731073
msg("DDL tracking : delete %" PRIu32 " \"%.*s\"",
10741074
space_id, int(len), name);
1075-
error= "delete";
1075+
if (fail && !opt_no_lock &&
1076+
check_if_fts_table(
1077+
filename_to_spacename(name, len).c_str())) {
1078+
/* Ignore the FTS internal table because InnoDB does
1079+
drop intermediate table and their associative FTS
1080+
internal table as a part of inplace rollback operation.
1081+
backup_set_alter_copy_lock() downgrades the
1082+
MDL_BACKUP_DDL before inplace phase of alter.
1083+
This leads to the FTS internal table being
1084+
dropped in the late phase of backup. */
1085+
fail = false;
1086+
}
1087+
error= "delete";
10761088
break;
10771089
default:
10781090
ut_ad(0);

0 commit comments

Comments
 (0)