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

[BUG] Kafka source stops committing offsets after consuming a record that results in deserialization error #3247

Closed
hshardeesi opened this issue Aug 25, 2023 · 0 comments · Fixed by #3260
Assignees
Labels
bug Something isn't working
Milestone

Comments

@hshardeesi
Copy link
Contributor

Describe the bug
With acknowledgments enabled, if KafkaConsumer encounters deserialization error while consuming a record then kafka source plugin stops committing offsets for that partition. Subsequent records are consumed and pushed to sink, but committed offset remains stuck on the offset one before the record that encountered deserialization exception.

To Reproduce

  • Create kafka topic and ingest json records.
  • Create pipeline with kafka source and "json" as serde_format
  • Send one text (non-json) record to the topic.
  • Deserialization exception will be thrown in pipeline.
  • Describe kafka consumer group on kafka cluster to observe partition LAG/committed offsets.
  • Any further records sent to the error partition will not result in new offsets being committed and LAG will remain non-zero.

Expected behavior
Failed records should not result in stuck committed offsets, commits should resume after accounting error records in NumberOfDeserializationErrors metric. (In future, failed records can be sent to source/pipeline level dlq if available)

@hshardeesi hshardeesi added bug Something isn't working untriaged labels Aug 25, 2023
@dlvenable dlvenable added this to the v2.4 milestone Aug 25, 2023
hshardeesi added a commit to hshardeesi/data-prepper that referenced this issue Aug 25, 2023
…ps on deserialization error)

Signed-off-by: Hardeep Singh <[email protected]>
hshardeesi added a commit to hshardeesi/data-prepper that referenced this issue Aug 25, 2023
…ps on deserialization error)

Signed-off-by: Hardeep Singh <[email protected]>
hshardeesi added a commit to hshardeesi/data-prepper that referenced this issue Aug 25, 2023
…ps on deserialization error)

Signed-off-by: Hardeep Singh <[email protected]>
dlvenable pushed a commit that referenced this issue Aug 25, 2023
@github-project-automation github-project-automation bot moved this from Unplanned to Done in Data Prepper Tracking Board Aug 25, 2023
opensearch-trigger-bot bot pushed a commit that referenced this issue Aug 25, 2023
…ion error) (#3260)

Signed-off-by: Hardeep Singh <[email protected]>
(cherry picked from commit 8114ab4)
dlvenable pushed a commit that referenced this issue Aug 26, 2023
…ion error) (#3260) (#3262)

Signed-off-by: Hardeep Singh <[email protected]>
(cherry picked from commit 8114ab4)

Co-authored-by: Hardeep Singh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
2 participants