-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Fix for a wrong error returned on full metadata refresh before joining a consumer group #4678
Conversation
799491c
to
3e05712
Compare
6f3c1b5
to
b27ccc6
Compare
3e05712
to
fc00cfc
Compare
d4d40c1
to
d9540da
Compare
fc00cfc
to
420116d
Compare
src/rdkafka_cgrp.c
Outdated
/* Insert all non-wildcard topics in cache. */ | ||
rd_kafka_metadata_cache_hint_rktparlist( | ||
rkcg->rkcg_rk, rkcg->rkcg_subscription, NULL, 0 /*dont replace*/); | ||
|
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.
We can keep this here as well I think as its just adding the hints. This function is used during rejoin as well.
src/rdkafka_cgrp.c
Outdated
rkcg->rkcg_subscription = rktparlist; | ||
if (rkcg->rkcg_subscription) { | ||
/* Insert all non-wildcard topics in cache immediately. | ||
* to avoid problems with subsequent metadata |
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.
What problems? Let's elaborate more in the comments.
d9540da
to
a159193
Compare
420116d
to
60045b7
Compare
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.
Minor comments.
tests/0146-metadata_mock.c
Outdated
test_mock_cluster_destroy(mcluster); | ||
|
||
SUB_TEST_PASS(); | ||
} | ||
|
||
int main_0146_metadata_mock(int argc, char **argv) { | ||
TEST_SKIP_MOCK_CLUSTER(0); | ||
|
||
do_test_metadata_persists_in_cache("range"); | ||
|
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.
Remove extra line from here.
|
||
int main_0146_metadata_mock(int argc, char **argv) { | ||
TEST_SKIP_MOCK_CLUSTER(0); | ||
|
||
do_test_metadata_persists_in_cache("range"); | ||
|
||
do_test_metadata_persists_in_cache("cooperative-sticky"); | ||
do_test_metadata_call_before_join(); |
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.
Add extra line before this.
CHANGELOG.md
Outdated
@@ -36,6 +38,10 @@ librdkafka v2.3.1 is a maintenance release: | |||
refreshes and occasional `UNKNOWN_TOPIC_OR_PART` errors. Solved by updating | |||
cache for existing or hinted entries instead of clearing them. | |||
Happening since 2.1.0 (#4677). | |||
* A metadata call before member joins consumer group, |
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.
Can we add the issue as well here for all the previous fixes as well?
78a5434
to
31fea0e
Compare
on full metadata refresh before joining a consumer group A metadata call before member joins consumer group, could lead to an `UNKNOWN_TOPIC_OR_PART` error. Solved by updating the consumer group following a metadata refresh only in safe states. Happening since 2.1.0
31fea0e
to
cbf2c54
Compare
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.
LGTM!..
…g a consumer group (#4678) A metadata call before member joins consumer group, could lead to an `UNKNOWN_TOPIC_OR_PART` error. Solved by updating the consumer group following a metadata refresh only in safe states. Happening since 2.1.0
…g a consumer group (#4678) A metadata call before member joins consumer group, could lead to an `UNKNOWN_TOPIC_OR_PART` error. Solved by updating the consumer group following a metadata refresh only in safe states. Happening since 2.1.0
A metadata call before member joins
consumer group, could lead to
an
UNKNOWN_TOPIC_OR_PART
error.Solved by updating the consumer group
following a metadata refresh only in safe states.
Happening since 2.1.0
Closes #4589