[MDEV-27464] Log transactions on replica with errors through a new replica_log_errors Created: 2021-12-06  Updated: 2024-01-31

Status: Open
Project: MariaDB Server
Component/s: Replication
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Anders Karlsson Assignee: Ralf Gebhardt
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Sometimes the slave_skip_errors has to be used as there are potential replication issues, such as when using circular or bidirectional replication, and in which case the customer first and foremost has to keep replication going and will have to resolve conflicts later. To manually resolve these conflicts is difficult though, as there is no way to note failed transactions, they are just silently ignored.
To fix this, a way to log errors is a way to solve this. This is might not be relevant for all failed replicated transaction so a system variable would be used, suggested to be called replica_log_errors. This would cause failed transactions with one of the given errors codes to be logged to a file in binlog format and with the file name and position of the relay log, to allow for cross referencing. The error would not be ignored, so replication would be halted, unless the listed error code is also listen in slave_skip_errors.
The setting is either "off", a list of error codes or "all", just like slave_skip_errors. The idea here is to allow SQL_SLAVE_SKIP_COUNTER to be used on errors, but said errors be logged.



 Comments   
Comment by Andrei Elkin [ 2021-12-29 ]

ralf.gebhardt@mariadb.com, I read the description as something like a logger equivalent to slave_skip_errors.
'Logger' should be defined, maybe

create a file in binlog format which includes a copy of the part of skipped transactions

makes sense (even though it feels redundancy).

MDEV-4989/MDEV-20119's filtering framework to engage here may not be too far stretch of imagination either.

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