percona-xtrabackup icon indicating copy to clipboard operation
percona-xtrabackup copied to clipboard

Skip dangling table description in partitioned space

Open kmichel-aiven opened this issue 2 years ago • 2 comments

This fixes backups that can't be restored because a table was turned into a partition and each partition .idb file still contains the description of the un-partitioned table, leading to a failing assert when trying to create that table more than once :

InnoDB: Assertion failure: dict0dict.cc:1214:table2 == nullptr

Stack trace :

xtrabackup(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x22d66fe]
xtrabackup(handle_fatal_signal+0x303) [0x1170603]
/lib64/libpthread.so.0(+0x141b0) [0x7f08be8471b0]
/lib64/libc.so.6(gsignal+0x145) [0x7f08bde0b9e5]
/lib64/libc.so.6(abort+0x116) [0x7f08bddf48a4]
xtrabackup() [0xbb7d66]
xtrabackup(dict_table_add_to_cache(dict_table_t*, unsigned long, mem_block_info_t*)+0x11c) [0x12fde6c]
xtrabackup(dd_table_create_on_dd_obj(dd::Table const*, dd::Partition const*, std::__cxx11::basic_string<char, std::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> > const*, bool, unsigned int)+0x1ac5) [0x1325585]
xtrabackup() [0x1328bd1]
xtrabackup(dd_table_load_on_dd_obj(dd::cache::Dictionary_client*, unsigned int, dd::Table const&, dict_table_t*&, THD*, std::__cxx11::basic_string<char, std::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> > const*, bool)+0xff) [0x1328d2f]
xtrabackup(dict_load_tables_from_space_id(unsigned int, THD*, trx_t*)+0x3d3) [0xc4d803]
xtrabackup() [0xc4dbff]
xtrabackup(main+0x1181) [0xc0ef71]
/lib64/libc.so.6(__libc_start_main+0xf2) [0x7f08bddf61e2]
xtrabackup(_start+0x2e) [0xc3eb3e]

kmichel-aiven avatar Aug 16 '21 07:08 kmichel-aiven

CLA assistant check
All committers have signed the CLA.

it-percona-cla avatar Aug 16 '21 07:08 it-percona-cla

Hi, I think it is related, however I already tried the top of the 8.0 branch (including ab329f2856a7da5b7bdedb794f3f65cb4fa35f57) with the problematic backup and it didn't fix the issue, I didn't even get the "duplicate SDI found for tablespace..." error message added in #1120.

kmichel-aiven avatar Aug 16 '21 13:08 kmichel-aiven

Hi @kmichel-aiven

Closing this PR due to inactivity. Please open a new PR if you wish to contribute further.

altmannmarcelo avatar Jul 31 '23 19:07 altmannmarcelo