Transaction loss after restoring from a backup

I’m trying to simulate a master crash and restore it from a slave backup in a gtid based replication.
However, when after the backup restore, when i setup the replication from old slave → old master
some transactions written on the slave are not replicated back on the new slave setup from the backup.

The backup on the slave is done with the following command:

xtrabackup --target-dir=/root/backup --user=<user> --password=<password> --safe-slave-backup --backup
xtrabackup --target-dir=/root/backup --prepare

on the mysql instance restored, the replication is setup by running the following command:

reset master;
set global gtid_purged='<gtid_taken_from_xtrabackup_binlog_info_file>'
change master to master_host='<oldslave>', master_user='<user>', master_password='<password>', master_auto_position=1;
start slave;

server configuration changes from the default config are:

gtid_mode=ON
enforce_gtid_consistency
log_bin=ON
log_slave_updates
expire_logs_days=10
binlog_format=ROW

am i missing something ?

1 Like