KAFKA-20430 Fix getTopicConfig() for connector-specific offset stores - #22984
Open
kaijaytu wants to merge 1 commit into
Open
KAFKA-20430 Fix getTopicConfig() for connector-specific offset stores#22984kaijaytu wants to merge 1 commit into
kaijaytu wants to merge 1 commit into
Conversation
Author
m1a2st
reviewed
Jul 29, 2026
m1a2st
left a comment
Collaborator
There was a problem hiding this comment.
Please also address this comment #20384 (comment)
kaijaytu
force-pushed
the
fix-connector-offset-getTopicConfig
branch
from
July 29, 2026 08:28
4cc3be1 to
68da24b
Compare
kaijaytu
force-pushed
the
fix-connector-offset-getTopicConfig
branch
from
July 29, 2026 08:31
68da24b to
c3a7433
Compare
Author
Author
|
Note: the error message in |
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.
Follow-up fix for #20384.
When
internal.topics.automatic.creation.enableis set tofalseand aconnector-specific offset topic is missing, the error message
incorrectly references the worker-level config
offset.storage.topicinstead of the connector-level config
offsets.storage.topic. This isbecause
readWriteStore()andreadOnlyStore()create anonymoussubclasses of
KafkaOffsetBackingStorethat do not overridegetTopicConfig().This patch overrides
getTopicConfig()in both factory methods toreturn
SourceConnectorConfig.OFFSETS_TOPIC_CONFIG(
offsets.storage.topic), so the error message correctly directs usersto the relevant connector configuration.
Changes
KafkaOffsetBackingStore.java: OverridegetTopicConfig()inreadWriteStore()andreadOnlyStore()anonymous classes to return theconnector-level config key
KafkaOffsetBackingStoreGetTopicConfigTest.javato verify thefix
Testing
Unit tests verify that:
KafkaOffsetBackingStorereturnsoffset.storage.topic(unchanged behavior)
readWriteStore()now returnsoffsets.storage.topic(wasincorrectly returning
offset.storage.topic)readOnlyStore()now returnsoffsets.storage.topic(wasincorrectly returning
offset.storage.topic)Existing tests (
KafkaOffsetBackingStoreTest,ConnectorOffsetBackingStoreTest) pass with no regression.