[MDEV-25995] Double entries are seen while streaming a backup with Mariabackup Created: 2021-06-23  Updated: 2022-03-02  Resolved: 2022-01-11

Status: Closed
Project: MariaDB Server
Component/s: mariabackup
Affects Version/s: 10.2
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Nilnandan Joshi Assignee: Rob Schwyzer
Resolution: Incomplete Votes: 1
Labels: None


 Description   

While restoring backup, observed below error

Error: Command: cat /backup/nfs/XXXX/XXX_3400_db164015_18-5_2021-06-13_0834456
/glide/mariadb/10.2.27/bin/mbstream: Can't create/write to file './XXX_1/sys_table.frm' (Errcode: 17 "File exists")
[00] 2021-06-14 00:28:55 /glide/mariadb/10.2.27/bin/mbstream: failed to create file.

While checking mariabackup log, found that there are two entries for streaming the same file. frm and ibd files for the sys_table were streaming twice. Also, table was in the process of rename during the same time.

[01] 2021-06-13 10:35:53 Streaming ./db_1/sys_table.ibd
[01] 2021-06-13 10:35:53         ...done
..
[01] 2021-06-13 10:40:48 Streaming ./db_1/sys_table.frm to <STDOUT>
[01] 2021-06-13 10:40:49 Streaming ./db_1/sys_table.frm to <STDOUT>
..
[00] 2021-06-13 10:40:49 DDL tracking : rename 246406 "./db_1/sys_table.ibd","./db_1/z_tmp_s1097477205h.ibd"
[00] 2021-06-13 10:40:49 DDL tracking : rename 246406 "./db_1/sys_table.ibd","./db_1/z_tmp_s1097477205h.ibd"
[00] 2021-06-13 10:40:49 DDL tracking : rename 246419 "./db_1/tmp_s1097477205h.ibd","./db_1/sys_table.ibd"
[00] 2021-06-13 10:40:49 DDL tracking : rename 246419 "./db_1/tmp_s1097477205h.ibd","./db_1/sys_table.ibd"
..
[00] 2021-06-13 10:40:50 Streaming db_1/sys_table.ren
..
[00] 2021-06-13 10:40:50 Streaming ./db_1/sys_table.ibd
[00] 2021-06-13 10:40:50         ...done

This is not reproducible. Is this a bug? or expected behavior?



 Comments   
Comment by Sergei Golubchik [ 2021-08-30 ]

You seem to be using --no-lock option. In this case the documentation clearly says that it's your responsibility to ensure there will be no concurrent DDLs. And this in particular case it seems there were concurrent renames. This broke the backup, as expected.

Generated at Thu Feb 08 09:41:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.