Add broker selection and client termination [KIP-714]#4382
Merged
Milind L (milindl) merged 2 commits intodev_kip_714from Aug 7, 2023
Merged
Add broker selection and client termination [KIP-714]#4382Milind L (milindl) merged 2 commits intodev_kip_714from
Milind L (milindl) merged 2 commits intodev_kip_714from
Conversation
| rd_kafka_dbg(rk, TELEMETRY, "TELTERM", | ||
| "Awaiting termination of telemetry."); | ||
| mtx_lock(&rk->rk_telemetry.lock); | ||
| cnd_wait(&rk->rk_telemetry.termination_cnd, &rk->rk_telemetry.lock); |
Contributor
There was a problem hiding this comment.
Will it make sense to do a timed_wait if for some case RD_KAFKA_TELEMETRY_TERMINATING_PUSH_SCHEDULED gets blocked somewhere?
Contributor
Author
There was a problem hiding this comment.
Agreed
How much should we wait for? 1s?
Contributor
There was a problem hiding this comment.
Hmm not sure, but I think 1s should be good. We can probably tweak it later if the terminating push takes more time.
Anchit Jain (anchitj)
approved these changes
Aug 7, 2023
Contributor
Anchit Jain (anchitj)
left a comment
There was a problem hiding this comment.
Thanks, LGTM!
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.
Main changes:
To accommodate this:
Makes changes so that the entire state machine runs on the main thread.
Communication with the broker thread (when preferred broker has to be set) and with the app thread (during termination) is done via ops or conditional variables.
Also updates some documentation comments.