Skip to content

row checksum is incorrect when enable avro-include-before-value #6339

Description

@wk989898

What did you do?

Enabled row-level checksum while testing a Kafka/Avro changefeed with TiCDC's new architecture.

  1. Enabled tidb_enable_row_level_checksum=true on upstream TiDB before writing data.
  2. Created a changefeed with:
[filter]
rules = ["test.*"]

[integrity]
integrity-check-level = "correctness"
corruption-handle-level = "error"

Sink URI options:

protocol=avro
enable-tidb-extension=true
avro-decimal-handling-mode=string
avro-bigint-unsigned-handling-mode=string
avro-include-before-value=true
  1. write some data include update sql

What did you expect to see?

UPDATE should include the current-row checksum and previous-row checksum

What did you see instead?

  • Avro messages contain _tidb_row_level_checksum, _tidb_corrupted and _tidb_checksum_version when checksum is enabled.
  • INSERT/UPDATE use the current-row checksum; DELETE with before-value enabled uses the previous-row checksum.

Versions of the cluster

Upstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

(paste TiDB cluster version here)

Upstream TiKV version (execute tikv-server --version):

(paste TiKV version here)

TiCDC version (execute cdc version):

(paste TiCDC version here)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions