[MDEV-13575] On failure, Mariabackup --backup --safe-slave-backup may forget to START SLAVE SQL_THREAD Created: 2017-08-18  Updated: 2017-08-18  Resolved: 2017-08-18

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.1, 10.2.7
Fix Version/s: 10.2.9

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: backup, replication

Issue Links:
Relates
relates to MDEV-13574 Memory leak in mariabackup.incrementa... Closed

 Description   

In Mariabackup, the function backup_start() that is invoked by xtrabackup_backup_func() that implements the --backup option is performing some steps that should be undone even in case of a failure. These steps are currently executed at the start of the function backup_finish() which should be invoked after a successful operation only:

	/* release all locks */
	if (!opt_no_lock) {
		unlock_all(mysql_connection);
		history_lock_time = 0;
	} else {
		history_lock_time = time(NULL) - history_lock_time;
	}
 
	if (opt_safe_slave_backup && sql_thread_started) {
		msg("Starting slave SQL thread\n");
		xb_mysql_query(mysql_connection,
				"START SLAVE SQL_THREAD", false);
	}

These steps, especially the START SLAVE SQL_THREAD, should be invoked also after a failed operation.



 Comments   
Comment by Marko Mäkelä [ 2017-08-18 ]

bb-10.2-marko

Comment by Vladislav Vaintroub [ 2017-08-18 ]

looks good

Generated at Thu Feb 08 08:06:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.