Skip to content

Fix up to a 1s delay in first produce to new topic #5032

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

milindl
Copy link
Contributor

@milindl milindl commented Apr 10, 2025

Currently, when creating a new rkt via the public api, rd_kafka_topic_new(), causes us to immediately make a leader query if the topic is unknown.

On the other hand, using the internal rd_kafka_topic_new0() does not do this. producev and produceva both call rd_kafka_topic_new0 in case topic is provided by name. So this delays produce until scan_all is run, which runs on a 1s timer.

Definitely affects JS client and I think it affects python client and dotnet client as well.

@Copilot Copilot AI review requested due to automatic review settings April 10, 2025 03:57
@milindl milindl requested a review from a team as a code owner April 10, 2025 03:57
@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

tests/0055-producer_latency.c:496

  • [nitpick] The variable 'wait_time_mss' appears ambiguous; consider renaming it to 'wait_times_ms' for clarity.
int wait_time_mss[] = {500, 1200, 2500, 3700, 4900};

@milindl milindl requested a review from Copilot April 10, 2025 04:07
@airlock-confluentinc airlock-confluentinc bot force-pushed the dev_metadata_new_topic_pullback_1s branch from a500cd0 to 7cf8368 Compare April 10, 2025 04:07
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

tests/0055-producer_latency.c:500

  • [nitpick] The variable name 'wait_time_mss' appears to contain a typo; consider renaming it to 'wait_time_ms' for clarity.
int wait_time_mss[] = {500, 1200, 2500, 3700, 4900};

@milindl milindl changed the title (Draft) Fix 1s delay in first produce Fix up to a 1s delay in first produce to new topic Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant