When handling renames: t1.ibd.ren file already exists

Description

DDLs can happen between redo_mgr.start and xb_load_tablespaces. In case if RENAME DDL happens - we end up with rename ddl in ddl_tracker but we don’t need it , cause the table was already copied with new name;

How to reproduce issue:

  1. Create table t1.ibd before the backup

  2. Start backup with --lock-ddl=REDUCED

  3. Pause atbetween redo_mgr.start and xb_load_tablespaces

  4. RENAME t1.ibd -> t2.ibd

  5. CREATE t1.ibd

  6. Unpause backup

  7. Here we already have scanned t2.ibd table with new name and we don’t need RENAME DDL in ddl_tracker

  8. Pause after debug_sync_point("xtrabackup_suspend_at_start");

  9. RENAME t1.ibd -> t3.ibd

  10. Unpause backup

  11. When handling ddl_tracker ddls we see ERROR Can't create/write to file t1.ibd.ren

because we trying to create t1.ibd.ren file twice

Environment

None

Activity

aibek.bukabayev April 24, 2024 at 7:04 AM

Reverting back to in progress, I need to add a test case

aibek.bukabayev April 24, 2024 at 7:00 AM

branch dev-reducedlock-trunk
commit 56a5adb28cfc45c27706f539094ec8838ec8c438

All the issues caused by table names have been resolved in this commit, where we changed the design to use space_id instead of table names for .ren/.del files

Satya Bodapati April 18, 2024 at 4:08 PM

the .ren mechanism changed to use space_id.ren files. Let me clarify if there is a test case for this.

Done

Details

Assignee

Reporter

Needs QA

Yes

Sprint

Priority

Smart Checklist

Created February 1, 2024 at 6:19 AM
Updated April 24, 2024 at 7:04 AM
Resolved April 24, 2024 at 7:00 AM