Get desktop application:
View/edit binary Protocol Buffers messages
BinlogSource specifies the source and filter parameters for Filtered Replication. KeyRange and Tables are legacy. Filter is the new way to specify the filtering rules.
Used in:
, ,the source keyspace
the source shard
the source tablet type
KeyRange is set if the request is for a keyrange
Tables is set if the request is for a list of tables
Filter is set if we're using the generalized representation for the filter.
OnDdl specifies the action to be taken when a DDL is encountered.
Source is an external mysql. This attribute should be set to the username to use in the connection
StopAfterCopy specifies if vreplication should be stopped after copying is done.
ExternalCluster is the name of the mounted cluster which has the source keyspace/db for this workflow it is of the type <cluster_type.cluster_name>
SourceTimeZone is the time zone in which datetimes on the source were stored, provided as an option in MoveTables
TargetTimeZone is not currently specifiable by the user, defaults to UTC for the forward workflows and to the SourceTimeZone in reverse workflows
BinlogTransaction describes a transaction inside the binlogs. It is streamed by vttablet for filtered replication, used during resharding.
Used in:
,the statements in this transaction
The Event Token for this event.
Used in:
what type of statement is this?
charset of this statement, if different from pre-negotiated default.
the sql
Used in:
BL_DML is deprecated.
Charset is the per-statement charset info from a QUERY_EVENT binlog entry.
Used in:
, ,@@session.character_set_client
@@session.collation_connection
@@session.collation_server
CharsetConversion represent a conversion of text from one charset to another
Used in:
FromCharset is the charset name from which we convert the text (e.g. latin1)
ToCharset is the charset name to which we convert the text (e.g. utf8mb4)
FieldEvent represents the field info for a table.
Used in:
Are ENUM and SET field values already mapped to strings in the ROW events? This allows us to transition VTGate VStream consumers from the pre v20 behavior of having to do this mapping themselves to the v20+ behavior of not having to do this anymore and to expect string values directly. NOTE: because this is the use case, this is ONLY ever set today in vstreams managed by the vstreamManager.
set for sidecardb tables
Filter represents a list of ordered rules. The first match wins.
Used in:
, ,FieldEventMode specifies the behavior if there is a mismatch between the current schema and the fields in the binlog. This can happen if the binlog position is before a DDL that would cause the fields to change. If vstreamer detects such an inconsistency, the behavior depends on the FieldEventMode. If the value is ERR_ON_MISMATCH (default), then it errors out. If it's BEST_EFFORT, it sends a field event with fake column names as "@1", "@2", etc.
Used in:
Journal contains the metadata for a journal event. The commit of a journal event indicates the point of no return for a migration.
Used in:
Id represents a unique journal id.
Tables is set if the journal represents a TABLES migration.
LocalPosition is the source position at which the migration happened.
ShardGtids is the list of targets to which the migration took place.
Participants is the list of source participants for a migration. Every participant is expected to have an identical journal entry. While streaming, the client must wait for the journal entry to be received from all pariticipants, and then replace them with new streams specified by ShardGtid. If a stream does not have all participants, a consistent migration is not possible.
SourceWorkflows is the list of workflows in the source shard that were migrated to the target. If a migration fails after a Journal is committed, this information is used to start the target streams that were created prior to the creation of the journal.
KeyspaceShard represents a keyspace and shard.
Used in:
Used in:
MigrationType specifies the type of migration for the Journal.
Used in:
Used in:
This will be PRIMARY when the actual primary key is used and it will be the name of the Primary Key equivalent if one is used instead. Otherwise it will be empty.
OnDDLAction lists the possible actions for DDLs.
Used in:
,RowChange represents one row change. If Before is set and not After, it's a delete. If After is set and not Before, it's an insert. If both are set, it's an update.
Used in:
DataColumns is a bitmap of all columns: bit is set if column is present in the after image.
JsonPartialValues is a bitmap of any JSON columns, where the bit is set if the value in the AFTER image is a partial JSON value that is represented as an expression of JSON_[INSERT|REPLACE|REMOVE](%s, '$.path', value) which then is used to add/update/remove a path in the JSON document. When the value is used the fmt directive must be replaced by the actual column name of the JSON field.
Used in:
RowEvent represent row events for one table.
Used in:
https://dev.mysql.com/doc/dev/mysql-server/latest/classbinary__log_1_1Rows__event.html
set for sidecardb tables
Rule represents one rule in a Filter.
Used in:
,Match can be a table name or a regular expression. If it starts with a '/', it's a regular expression. For example, "t" matches a table named "t", whereas "/t.*" matches all tables that begin with 't'.
Filter: If empty, all columns and rows of the matching tables are sent. If it's a keyrange like "-80", only rows that match the keyrange are sent. If Match is a table name instead of a regular expression, the Filter can also be a select expression like this: "select * from t", same as an empty Filter, or "select * from t where in_keyrange('-80')", same as "-80", or "select col1, col2 from t where in_keyrange(col1, 'hash', '-80'), or What is allowed in a select expression depends on whether it's a vstreamer or vreplication request. For more details, please refer to the specific package documentation. On the vreplication side, Filter can also accept a special "exclude" value, which will cause the matched tables to be excluded. TODO(sougou): support this on vstreamer side also.
ConvertEnumToText: optional, list per enum column name, the list of textual values. When reading the binary log, all enum values are numeric. But sometimes it is useful/needed to know what the textual mapping are. Online DDL provides such use case.
Example: key="color", value="'red','green','blue'"
ConvertCharset: optional mapping, between column name and a CharsetConversion. This hints to vreplication that columns are encoded from/to non-trivial charsets The map is only populated when either "from" or "to" charset of a column are non-trivial trivial charsets are utf8 and ascii variants.
SourceUniqueKeyColumns represents the ordered columns in the index used by rowstreamer to iterate the table It is comma delimited, as in col1,col2,col3 (tokens are escaped via net/url)
TargetUniqueKeyColumns represents the ordered columns in that index used by vcopier and vplayer to apply rows It is comma delimited, as in col1,col2,col3 (tokens are escaped via net/url)
SourceUniqueKeyTargetColumns represents the names of columns in target table, mapped from the chosen unique key on source tables (some columns may be renamed from source to target)
ConvertIntToEnum lists any columns that are converted from an integral value into an enum. such columns need to have special transofrmation of the data, from an integral format into a string format. e.g. the value 0 needs to be converted to '0'.
ForceUniqueKey gives vtreamer a hint for `FORCE INDEX (...)` usage.
ShardGtid contains the GTID position for one shard. It's used in a request for requesting a starting position. It's used in a response to transmit the current position of a shard. It's also used in a Journal to indicate the list of targets and shard positions to migrate to.
Used in:
,StreamKeyRangeRequest is the payload to StreamKeyRange
Used as request type in: binlogservice.UpdateStream.StreamKeyRange
where to start
what to get
default charset on the player side
StreamKeyRangeResponse is the response from StreamKeyRange
Used as response type in: binlogservice.UpdateStream.StreamKeyRange
StreamTablesRequest is the payload to StreamTables
Used as request type in: binlogservice.UpdateStream.StreamTables
where to start
what to get
default charset on the player side
StreamTablesResponse is the response from StreamTables
Used as response type in: binlogservice.UpdateStream.StreamTables
Used in:
, ,VEvent represents a vstream event. A FieldEvent is sent once for every table, just before the first event for that table. The client is expected to cache this information and match it against the RowEvent which contains the table name. A GTID event always precedes a commitable event, which can be COMMIT, DDL or OTHER. OTHER events are non-material events that have no additional metadata.
Used in:
,Timestamp is the binlog timestamp in seconds. The value should be ignored if 0.
Gtid is set if the event type is GTID.
Statement is set if the event type is DDL, DML or SAVEPOINT.
RowEvent is set if the event type is ROW.
FieldEvent is set if the event type is FIELD.
Vgtid is set if the event type is VGTID. This event is only generated by VTGate's VStream function.
Journal is set if the event type is JOURNAL.
Dml is set if the event type is INSERT, REPLACE, UPDATE or DELETE.
CurrentTime specifies the current time when the message was sent. This can be used to compenssate for clock skew.
LastPK is the last PK for a table
the source keyspace
the source shard
indicate that we are being throttled right now
ThrottledReason is a human readable string that explains why the stream is throttled
VEventType enumerates the event types. Many of these types will not be encountered in RBR mode.
Used in:
INSERT, REPLACE, UPDATE, DELETE and SET will not be seen in RBR mode.
OTHER is a dummy event. If encountered, the current GTID must be recorded by the client to be able to resume.
HEARTBEAT is sent if there is inactivity. If a client does not receive events beyond the hearbeat interval, it can assume that it's lost connection to the vstreamer.
VGTID is generated by VTGate's VStream that combines multiple GTIDs.
COPY_COMPLETED is sent when VTGate's VStream copy operation is done. If a client experiences some disruptions before receiving the event, the client should restart the copy operation.
A VGtid is a list of ShardGtids.
Used in:
,VReplicationWorklfowState defines the valid states that a workflow can be in.
Used in:
, , ,VReplicationWorkflowSubType define types of vreplication workflows.
Used in:
,VReplicationWorkflowType define types of vreplication workflows.
Used in:
,Used in:
, ,VStreamRequest is the payload for VStreamer
Used as request type in: queryservice.Query.VStream
VStreamResponse is the response from VStreamer
Used as response type in: queryservice.Query.VStream
VStreamResultsRequest is the payload for VStreamResults The ids match VStreamRows, in case we decide to merge the two. The ids match VStreamRows, in case we decide to merge the two.
Used as request type in: queryservice.Query.VStreamResults
VStreamResultsResponse is the response from VStreamResults The ids match VStreamRows, in case we decide to merge the two.
Used as response type in: queryservice.Query.VStreamResults
VStreamRowsRequest is the payload for VStreamRows
Used as request type in: queryservice.Query.VStreamRows
VStreamRowsResponse is the response from VStreamRows
Used as response type in: queryservice.Query.VStreamRows
Throttled indicates that rowstreamer is being throttled right now
Heartbeat indicates that this is a heartbeat message
ThrottledReason is a human readable string that explains why the stream is throttled
VStreamTablesRequest is the payload for VStreamTables
Used as request type in: queryservice.Query.VStreamTables
VStreamTablesResponse is the response from VStreamTables
Used as response type in: queryservice.Query.VStreamTables