Feature Request: retain important vreplication messages #16924
Labels
Component: Online DDL
Online DDL (vitess/native/gh-ost/pt-osc)
Component: VReplication
Type: Feature
Feature Description
Today,
vreplication
can overwrite useful terminal error message with generic messages. This happens when we runsetState
. A sample scenario:vreplication
workflow fails on an unrecoverable error, say duplicate key,errno 1062
._vt.vreplication
to appropriate values ("failed inserting rows: Duplicate entry ..."
)setState
,and the information in the above message is overwritten by e.g."Picked source tablet..."
My suggestion is very simple and without adding risks:
state
andmessage
can stay as they were. These indicate the last known state + message, that's fine.terminal_error text default null
column.UPDATE _vt.vreplication SET terminal_error=COALESCE(terminal_error, ?)
.Online DDL will also use this change. When it reads the error message from
_vt.vreplication
, it will run:SELECT ...., COALESCE(terminal_error, message) as message, ... FROM _vt.vreplication
.Use Case(s)
Better analysis of vreplication / Online DDL errors.
The text was updated successfully, but these errors were encountered: