Howyd Ragul,
> Hi team,
>
> I have facing a replication issue in my DB setup where we have a master-slave server and replication is ON between
> the servers.
>
> Environment: MariaDB 10.6.11
> DB size: approx. 1TB
>
> While taking mariabackup, at the stage of preparing backup I see some interpretation in replication which I can see
> in MySQL logs. Backup was successful but the replication is not catching up with the master and able to see the
> slave worker are getting stuck forever (as per Processlist). Even if we stop the slave SQL thread or stop slave not
> fixing the issue. (WIthout backup process the replication is working
> fine without any delays)
By the show-processlist I could suspect
MDEV-30780 optimistic parallel slave hangs after hit an error
If you can reproduce it, could you please file a Jira
https://jira.mariadb.org/ ticket to include
1. mysqlbinlog output of the replication events (you may need a master
binlog for that) being executed by all workers at that
time (find the last executed through Show-Slave-Status, or
@@global.gtid_slave_pos).
2. slave error log
3. execute on slave
gdb -ex 'set height 0' -ex 'thread apply all backtrace' -p "find yourself mariadb-pid"
> | 704638 | system user | | NULL | Slave_worker | 113000 | Waiting for prior transaction to commit | NULL | 0.000 |
> | 704639 | system user | | NULL | Slave_worker | 113000 | closing tables | NULL | 0.000 |
> | 704641 | system user | | NULL | Slave_worker | 113000 | Waiting for prior transaction to commit | NULL | 0.000 |
To
> Replication as a Backup Solution - MariaDB Knowledge Base as per the page "Running the backup from a slave has the
> advantage of being able to shutdown or lock the slave and perform a backup without any impact on the primary
> server."
> Does it mean running a backup in a slave might impact the replication?
Not really. The sentance merely says the master server performance
won't be affected when one takes backup on the slave.
> If this is expected behavior, do we have any
> proper way to achieve a backup on a daily basis in the replication server?
>
> Or The backup is not the problem and some other factor (like a deadlock) is affecting the slave thread to lock?
>
I would think of deadlock.
Cheers,
Andrei