forked from RepentantGopher/tnt-kafka
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
21 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "librdkafka"] | ||
path = librdkafka | ||
url = https://github.com/edenhill/librdkafka.git | ||
url = https://github.com/confluentinc/librdkafka.git |
This file contains 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
Submodule librdkafka
updated
458 files
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,30 @@ | ||
diff --git a/src/rdkafka_assignment.c b/src/rdkafka_assignment.c | ||
index 5f05683d..1db90ece 100644 | ||
index 6d1f0191..ee4cea61 100644 | ||
--- a/src/rdkafka_assignment.c | ||
+++ b/src/rdkafka_assignment.c | ||
@@ -276,19 +276,22 @@ static void rd_kafka_assignment_handle_OffsetFetch(rd_kafka_t *rk, | ||
if (err) { | ||
rd_kafka_dbg(rk, CGRP, "OFFSET", | ||
"Offset fetch error for %d partition(s): %s", | ||
- offsets->cnt, rd_kafka_err2str(err)); | ||
+ offsets ? offsets->cnt : -1, | ||
+ rd_kafka_err2str(err)); | ||
rd_kafka_consumer_err( | ||
rk->rk_consumer.q, rd_kafka_broker_id(rkb), err, 0, NULL, | ||
NULL, RD_KAFKA_OFFSET_INVALID, | ||
"Failed to fetch committed offsets for " | ||
"%d partition(s) in group \"%s\": %s", | ||
- offsets->cnt, rk->rk_group_id->str, rd_kafka_err2str(err)); | ||
+ offsets ? offsets->cnt : -1, rk->rk_group_id->str, | ||
+ rd_kafka_err2str(err)); | ||
@@ -315,21 +315,22 @@ static void rd_kafka_assignment_handle_OffsetFetch(rd_kafka_t *rk, | ||
rd_kafka_dbg( | ||
rk, CGRP, "OFFSET", | ||
"Offset fetch error for %d partition(s): %s", | ||
- offsets->cnt, rd_kafka_err2str(err)); | ||
+ offsets ? offsets->cnt : -1, rd_kafka_err2str(err)); | ||
rd_kafka_consumer_err( | ||
rk->rk_consumer.q, rd_kafka_broker_id(rkb), err, 0, | ||
NULL, NULL, RD_KAFKA_OFFSET_INVALID, | ||
"Failed to fetch committed offsets for " | ||
"%d partition(s) in group \"%s\": %s", | ||
- offsets->cnt, rk->rk_group_id->str, | ||
+ offsets ? offsets->cnt : -1, rk->rk_group_id->str, | ||
rd_kafka_err2str(err)); | ||
} | ||
} | ||
|
||
/* Apply the fetched offsets to the assignment */ | ||
- rd_kafka_assignment_apply_offsets(rk, offsets, err); | ||
- | ||
- rd_kafka_topic_partition_list_destroy(offsets); | ||
+ if (offsets) { | ||
+ rd_kafka_assignment_apply_offsets(rk, offsets, err); | ||
+ rd_kafka_topic_partition_list_destroy(offsets); | ||
+ rd_kafka_assignment_apply_offsets(rk, offsets, err); | ||
+ rd_kafka_topic_partition_list_destroy(offsets); | ||
+ } | ||
} | ||
|
||
|