[fix][io] Fix acknowledgments not being sent when collapsePartitionedTopics=true in kafka-connect-adapter#31
Closed
sandeep-mst wants to merge 1 commit intobranch-4.0from
Closed
Conversation
…as well and added integration tests for the same
dd28709 to
61d4da7
Compare
15 tasks
Collaborator
Author
|
Closing this in favour of PR in connectors repository. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes apache#25450
Motivation
Fix acknowledgments not being sent when the
collapsePartitionedTopics=trueon kafka-connect-adapter. The topic name stored in sinkrecord and currentOffsets is different from the topic name stored in the pulsar record.The topic name used in SinkRecord / currentOffsets is collapsed (base topic name) and the topic name in the original Pulsar Record remains non-collapsed (includes -partition-X)
As a result, during
ackUntil()nullbecause of topic name mismatch.Modifications
Updated
ackUntil()to derive topic and partition from the source Record using the same logic astoSinkRecord()(i.e., respectingcollapsePartitionedTopics)Added a debug log and
ackRequestedCountfor better logging clarity.Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: