From 6a1595f5e28a3627e2e0efc1bf28ea3dcdb094c7 Mon Sep 17 00:00:00 2001 From: Magnus Edenhill Date: Thu, 26 Aug 2021 18:58:27 +0200 Subject: [PATCH] rxidle and txidle were stats emitted as unsigned 64, now signed (#3519) --- CHANGELOG.md | 1 + src/rdkafka.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ed7663602..197bcafa9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ librdkafka v1.8.0 is a security release: is set to 0 - which disables ticket refreshes (by @mpekalski, #3431). * Rename internal crc32c() symbol to rd_crc32c() to avoid conflict with other static libraries (#3421). + * `txidle` and `rxidle` in the statistics object was emitted as 18446744073709551615 when no idle was known. -1 is now emitted instead. (#3519) ### Consumer fixes diff --git a/src/rdkafka.c b/src/rdkafka.c index f3b5d6274f..8ffd91b643 100644 --- a/src/rdkafka.c +++ b/src/rdkafka.c @@ -1703,14 +1703,14 @@ static void rd_kafka_stats_emit_all (rd_kafka_t *rk) { "\"txbytes\":%"PRIu64", " "\"txerrs\":%"PRIu64", " "\"txretries\":%"PRIu64", " - "\"txidle\":%"PRIu64", " + "\"txidle\":%"PRId64", " "\"req_timeouts\":%"PRIu64", " "\"rx\":%"PRIu64", " "\"rxbytes\":%"PRIu64", " "\"rxerrs\":%"PRIu64", " "\"rxcorriderrs\":%"PRIu64", " "\"rxpartial\":%"PRIu64", " - "\"rxidle\":%"PRIu64", " + "\"rxidle\":%"PRId64", " "\"zbuf_grow\":%"PRIu64", " "\"buf_grow\":%"PRIu64", " "\"wakeups\":%"PRIu64", "