Skip to content
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

Merged
merged 2 commits into from
Apr 18, 2024
Merged

Conversation

emasab
Copy link
Contributor

@emasab emasab commented Apr 17, 2024

No description provided.

@emasab emasab force-pushed the dev_kip848_logging_improvements branch from eeb87cd to 60caf0d Compare April 17, 2024 17:31
@@ -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");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
rk->rk_cgrp, "OffsetFetch error: Unknown member");
rk->rk_cgrp, "OffsetFetch error: Unknown member id");

Comment on lines 2670 to 2673
"Assignment is the same, "
"next assignment %s",
(has_next_target_assignment_to_clear
? "cleared"
: "not cleared"));
Copy link
Member

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.

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, "
Copy link
Member

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"

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 &&
Copy link
Member

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.

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 =
Copy link
Member

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");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
rk->rk_cgrp, "OffsetCommit error: Unknown member");
rk->rk_cgrp, "OffsetCommit error: Unknown member id");

Copy link
Contributor Author

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?

@emasab emasab force-pushed the dev_kip848_logging_improvements branch from b38284a to 841b104 Compare April 18, 2024 07:29
Copy link
Member

@pranavrth pranavrth left a comment

Choose a reason for hiding this comment

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

LGTM!

@emasab emasab force-pushed the dev_kip848_logging_improvements branch from 841b104 to 798196a Compare April 18, 2024 08:26
@emasab emasab merged commit 3cad240 into dev_kip848 Apr 18, 2024
2 checks passed
@emasab emasab deleted the dev_kip848_logging_improvements branch April 18, 2024 08:48
emasab added a commit that referenced this pull request Apr 18, 2024
anchitj pushed a commit that referenced this pull request Jun 10, 2024
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.

2 participants