vitess.io/vitess@v0.16.2/tools/rowlog/rowlog.md (about) 1 #rowlog 2 3 `rowlog` is a diagnostic tool for researching issues reported by users in vreplication workflows. These are usually 4 reported as data mismatches or loss and are not reproducible because of the huge amounts of data involved and 5 data privacy reasons. Also, the database configurations vary greatly: number/type/size of columns, collations, 6 keys/indexes etc. 7 8 In order to rule out that the problem is not related to the core vreplication algorithm this tool has been built. 9 10 `rowlog` is a standalone command-line tool. For a given set of primary keys for a table (only non-composite 11 integer primary keys are supported) it outputs the binlogs associated with these ids, both on the source and 12 on the target. 13 14 The binlogs on the source and target will usually not be identical because vreplication can "merge" multiple 15 binlog entries during the initial copy phase. 16 17 `rowlog` uses the vstream API to stream events for the specified table from both the source and target keyspaces. 18 19 Here is an example of how to invoke it: 20 21 ``` 22 go build 23 ./rowlog -ids 1,3,4 -table customer -pk customer_id -source commerce -target customer -vtctld localhost:15999 24 -vtgate localhost:15991 -cells zone1 -topo_implementation etcd2 -topo_global_server_address localhost:2379 25 -topo_global_root /vitess/global 26 ``` 27 28 The resulting binlog entries are output to two tab-separated files which can be inspected to validate if 29 data being copied is consistent. 30 31 Initial version is for unsharded keyspaces but can be easily extended for sharded. 32 33 Another possible enhancement is to also stream the events to the _vt.vreplication table so that we can track the 34 source gtid positions related to the sql applied on the target. However this requires changes in vreplication: 35 currently the sidecar _vt database is not streamed.