So, there are no checks of checkpoint_lsn_start value vs log_copy_scanned_lsn value and if this function is used and was executed, xtrabackup process just exits with success, no matter what happens. innobackupex script then has no way to find out there was a problem:
if ( $ibbackup_exit_code == 0 ) {
# program has completed successfully
print STDERR "$now $prefix completed OK!\n";
}
else {
print STDERR "$now $prefix $option_ibbackup_binary failed! (exit code $ibbackup_exit_code) The backup may not be complete.\n";
}
This is easy to confirm with code review. Main backup function, xtrabackup_ backup_ func, is declared void:
openxs@ ao756:~ /git/percona- xtrabackup$ grep -rn xtrabackup_ backup_ func * innobase/ xtrabackup/ src/xtrabackup. cc:3278: xtrabackup_ backup_ func(void) innobase/ xtrabackup/ src/xtrabackup. cc:6367: xtrabackup_ backup_ func();
storage/
storage/
and ends up like this:
... lsn_start, log_copy_ scanned_ lsn); files_close( );
3736 msg("xtrabackup: Transaction log of lsn (" LSN_PF ") to (" LSN_PF
3737 ") was copied.\n", checkpoint_
3738 xb_filters_free();
3739
3740 xb_data_
3741 }
It is used like this:
6365 /* --backup */ backup_ func(); stats_func( ); prepare) prepare_ func();
6366 if (xtrabackup_backup)
6367 xtrabackup_
6368
6369 /* --stats */
6370 if (xtrabackup_stats)
6371 xtrabackup_
6372
6373 /* --prepare */
6374 if (xtrabackup_
6375 xtrabackup_
6376
6377 xb_regex_end();
6378
6379 exit(EXIT_SUCCESS);
So, there are no checks of checkpoint_ lsn_start value vs log_copy_ scanned_ lsn value and if this function is used and was executed, xtrabackup process just exits with success, no matter what happens. innobackupex script then has no way to find out there was a problem:
if ( $ibbackup_exit_code == 0 ) { ibbackup_ binary failed! (exit code $ibbackup_ exit_code) The backup may not be complete.\n";
# program has completed successfully
print STDERR "$now $prefix completed OK!\n";
}
else {
print STDERR "$now $prefix $option_
}