Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Length of messages written to Kafka exceeds max-message-bytes #1059

Closed
liuzix opened this issue Nov 5, 2020 · 1 comment
Closed

Length of messages written to Kafka exceeds max-message-bytes #1059

liuzix opened this issue Nov 5, 2020 · 1 comment
Assignees
Labels
area/ticdc Issues or PRs related to TiCDC. bug-from-user Bugs found by users. component/open-protocol Open TiCDC protocol component. component/sink Sink component. difficulty/hard Hard task. priority/P0 The issue has P0 priority. type/bug The issue is confirmed as a bug.
Milestone

Comments

@liuzix
Copy link
Contributor

liuzix commented Nov 5, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.
    Set message-max-bytes parameter in sink-uri to a number less than 4MB, when using the Kafka sink.

  2. What did you expect to see?
    That replication works normally.

  3. What did you see instead?
    That CDC exits with error CDC:ErrKafkaAsyncSendMessage

Analysis

This bug is caused by mqSink not limiting the message size according to message-max-bytes, which is only used by KafkaProducer but not mqSink. mqSink should make use of this value, and avoid issuing writes to Kafka that are large than message-max-bytes.

Caveats

  • What if we have a change record that exceeds message-max-bytes even on its own?
  • Protocols such as Canal produce messages whose sizes are not easily predictable based on sizes of individual records and are not known until a complete message has been produced. What is the best way to determine it is time to cut off the message?
@liuzix liuzix added type/bug The issue is confirmed as a bug. component/open-protocol Open TiCDC protocol component. component/sink Sink component. bug-from-user Bugs found by users. difficulty/hard Hard task. labels Nov 5, 2020
@liuzix liuzix self-assigned this Nov 6, 2020
@liuzix liuzix added the priority/P0 The issue has P0 priority. label Nov 6, 2020
@amyangfei amyangfei added this to the v4.0.9 milestone Nov 6, 2020
@amyangfei
Copy link
Contributor

fixed by #1079

@AkiraXie AkiraXie added the area/ticdc Issues or PRs related to TiCDC. label Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ticdc Issues or PRs related to TiCDC. bug-from-user Bugs found by users. component/open-protocol Open TiCDC protocol component. component/sink Sink component. difficulty/hard Hard task. priority/P0 The issue has P0 priority. type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

3 participants