Add parse_row method to replication stream class

This will allow individual stream classes to override how a row is parsed.
This commit is contained in:
Richard van der Hoff 2019-03-27 07:40:32 +00:00
parent 91c3513668
commit f570916a3e
3 changed files with 19 additions and 3 deletions

View file

@ -605,7 +605,7 @@ class ClientReplicationStreamProtocol(BaseReplicationStreamProtocol):
inbound_rdata_count.labels(stream_name).inc()
try:
row = STREAMS_MAP[stream_name].ROW_TYPE(*cmd.row)
row = STREAMS_MAP[stream_name].parse_row(cmd.row)
except Exception:
logger.exception(
"[%s] Failed to parse RDATA: %r %r",