Skip to content

Commit

Permalink
update librdkafka to 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
olegrok committed Jun 13, 2024
1 parent 608b459 commit f24ebae
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if(STATIC_BUILD)
add_library(librdkafka_static INTERFACE)
add_dependencies(librdkafka_static librdkafka)
ExternalProject_Get_Property(librdkafka INSTALL_DIR)
target_include_directories(librdkafka_static INTERFACE ${INSTALL_DIR}/include)
target_include_directories(librdkafka_static SYSTEM INTERFACE ${INSTALL_DIR}/include)
target_link_libraries(librdkafka_static INTERFACE ${INSTALL_DIR}/lib/librdkafka.a)

set(RDKAFKA_LIBRARY ${RDKAFKA_LIBRARY} librdkafka_static)
Expand Down
2 changes: 1 addition & 1 deletion librdkafka
Submodule librdkafka updated 458 files
38 changes: 18 additions & 20 deletions patches/librdkafka-tarantool-security-47.patch
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);
+ }
}


0 comments on commit f24ebae

Please sign in to comment.