pingcap / docs

TiDB database documentation.
https://docs.pingcap.com
Other
579 stars 673 forks source link

TiCDC example include wrong values #19006

Open choudharypankaj opened 3 days ago

choudharypankaj commented 3 days ago

File: /release-8.1/ticdc/ticdc-open-protocol.md

INSERT INTO test.t1(id, val) VALUES (1, 'aa'); INSERT INTO test.t1(id, val) VALUES (2, 'aa')

From the following Log 5 and Log 6, you can see that Row Changed Events on the same table might be sent to different partitions based on the primary key, but changes to the same row are sent to the same partition so that the downstream can easily process the Event concurrently.

The corresponding output is wrong:

  1. [partition=0] [key="{\"ts\":415508878783938562,\"scm\":\"test\",\"tbl\":\"t1\",\"t\":1}"] [value="{\"u\":{\"id\":{\"t\":3,\"h\":true,\"v\":1},\"val\":{\"t\":15,\"v\":\"YWE=\"}}}"]
  2. [partition=1] [key="{\"ts\":415508878783938562,\"scm\":\"test\",\"tbl\":\"t1\",\"t\":1}"] [value="{\"u\":{\"id\":{\"t\":3,\"h\":true,\"v\":2},\"val\":{\"t\":15,\"v\":\"YmI=\"}}}"]

and so are the remaining output values

qiancai commented 2 days ago

@3AceShowHand Would you please take a look at the following feedback and update the docs if necessary? Thanks.

3AceShowHand commented 2 days ago

@choudharypankaj Can you explain in more detail, what's wrong with this example ?