-
Notifications
You must be signed in to change notification settings - Fork 15.4k
KAFKA-10340: Improve the trace logging under connector based topic creation #9149
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
Changes from 4 commits
b2a8d62
b1131ff
fb77171
ed949d7
094ee6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -344,7 +344,7 @@ private boolean sendRecords() { | |||||||||
| continue; | ||||||||||
| } | ||||||||||
|
|
||||||||||
| log.trace("{} Appending record with key {}, value {}", this, record.key(), record.value()); | ||||||||||
| log.trace("{} Appending record to the topic {} with key {}, value {}", this, record.topic(), record.key(), record.value()); | ||||||||||
| // We need this queued first since the callback could happen immediately (even synchronously in some cases). | ||||||||||
| // Because of this we need to be careful about handling retries -- we always save the previously attempted | ||||||||||
| // record as part of toSend and need to use a flag to track whether we should actually add it to the outstanding | ||||||||||
|
|
@@ -409,6 +409,9 @@ private boolean sendRecords() { | |||||||||
| // RegexRouter) topic creation can not be batched for multiple topics | ||||||||||
| private void maybeCreateTopic(String topic) { | ||||||||||
| if (!topicCreation.isTopicCreationRequired(topic)) { | ||||||||||
| log.trace("The topic creation setting is disabled or the topic name {} is already in the topic cache." + | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| "If the topic doesn't exist, we'll rely on the auto.create.topics.enable setting in broker side " + | ||||||||||
| "to see if the topic can be auto created or not", topic); | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| return; | ||||||||||
| } | ||||||||||
| log.info("The task will send records to topic '{}' for the first time. Checking " | ||||||||||
|
|
@@ -430,7 +433,7 @@ private void maybeCreateTopic(String topic) { | |||||||||
| log.info("Created topic '{}' using creation group {}", newTopic, topicGroup); | ||||||||||
| } else { | ||||||||||
| log.warn("Request to create new topic '{}' failed", topic); | ||||||||||
| throw new ConnectException("Task failed to create new topic " + topic + ". Ensure " | ||||||||||
| throw new ConnectException("Task failed to create new topic " + newTopic + ". Ensure " | ||||||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are referring to the inclusion of topic properties besides the topic name. Yeah that's fine. |
||||||||||
| + "that the task is authorized to create topics or that the topic exists and " | ||||||||||
| + "restart the task"); | ||||||||||
| } | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be very repetitive after the first time during which the topic might be created.
What's the hint we are trying to extract here?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kkonstantine , thanks for the comment, what I'm trying to do here is to let the user know if the creating topic pending for a long time without response (default timeout is 30 or 60 secs), we let user know earlier that this situation might happen, and it could because the
auto.create.topics.enableis disabled.