-
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
[KIP-848] Logging improvements #4692
Conversation
eeb87cd
to
60caf0d
Compare
src/rdkafka_cgrp.c
Outdated
@@ -1370,7 +1370,7 @@ static void rd_kafka_cgrp_rejoin(rd_kafka_cgrp_t *rkcg, const char *fmt, ...) { | |||
|
|||
rd_kafka_cgrp_consumer_reset(rkcg); | |||
rd_kafka_cgrp_set_join_state(rkcg, RD_KAFKA_CGRP_JOIN_STATE_INIT); | |||
rd_kafka_cgrp_consumer_expedite_next_heartbeat(rkcg); | |||
rd_kafka_cgrp_consumer_expedite_next_heartbeat(rkcg, "rejoin"); |
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.
rd_kafka_cgrp_consumer_expedite_next_heartbeat(rkcg, "rejoin"); | |
rd_kafka_cgrp_consumer_expedite_next_heartbeat(rkcg, "rejoining"); |
case RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID: | ||
rd_kafka_cgrp_consumer_expedite_next_heartbeat( | ||
rk->rk_cgrp); | ||
rk->rk_cgrp, "OffsetFetch error: Unknown member"); |
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.
rk->rk_cgrp, "OffsetFetch error: Unknown member"); | |
rk->rk_cgrp, "OffsetFetch error: Unknown member id"); |
src/rdkafka_cgrp.c
Outdated
"Assignment is the same, " | ||
"next assignment %s", | ||
(has_next_target_assignment_to_clear | ||
? "cleared" | ||
: "not cleared")); |
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.
Its confusing that we are not clearing even if the assignment is same. Should explain more.
src/rdkafka_cgrp.c
Outdated
rd_kafka_topic_partition_list_destroy( | ||
rkcg->rkcg_next_target_assignment); | ||
rkcg->rkcg_next_target_assignment = NULL; | ||
} | ||
|
||
rd_kafka_dbg(rkcg->rkcg_rk, CGRP, "HEARTBEAT", | ||
"Assignment is the same, " |
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 should have something like, "Reconciling/Not Reconciling with the new assignment due to: REASON"
src/rdkafka_cgrp.c
Outdated
if (rkcg->rkcg_consumer_flags & RD_KAFKA_CGRP_CONSUMER_F_WAIT_ACK) | ||
rd_bool_t is_assignment_different = rd_false, | ||
has_next_target_assignment_to_clear = | ||
rkcg->rkcg_next_target_assignment && |
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.
I was checking the code again and feel that this part of the check is not required - rkcg->rkcg_next_target_assignment
but let's keep it for this release.
src/rdkafka_cgrp.c
Outdated
rd_bool_t is_assignment_different = rd_false; | ||
if (rkcg->rkcg_consumer_flags & RD_KAFKA_CGRP_CONSUMER_F_WAIT_ACK) | ||
rd_bool_t is_assignment_different = rd_false, | ||
has_next_target_assignment_to_clear = |
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.
lets keep these two variable initializations to different lines.
@@ -3794,7 +3813,7 @@ static void rd_kafka_cgrp_op_handle_OffsetCommit(rd_kafka_t *rk, | |||
if (rkcg->rkcg_group_protocol == | |||
RD_KAFKA_GROUP_PROTOCOL_CONSUMER) { | |||
rd_kafka_cgrp_consumer_expedite_next_heartbeat( | |||
rk->rk_cgrp); | |||
rk->rk_cgrp, "OffsetCommit error: Unknown member"); |
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.
rk->rk_cgrp, "OffsetCommit error: Unknown member"); | |
rk->rk_cgrp, "OffsetCommit error: Unknown member id"); |
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.
Used the same error message as line 3833, do I change it there too?
b38284a
to
841b104
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!
841b104
to
798196a
Compare
No description provided.