You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2024/09/04 07:09:09 UTC
(kafka) branch trunk updated: KAFKA-17454 Fix failed transactions_mixed_versions_test.py when running with 3.2 (#17067)
This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new f0f37409be5 KAFKA-17454 Fix failed transactions_mixed_versions_test.py when running with 3.2 (#17067)
f0f37409be5 is described below
commit f0f37409be5fe2610f988c04a96ea8a7483e8100
Author: TengYao Chi <ki...@gmail.com>
AuthorDate: Wed Sep 4 15:09:03 2024 +0800
KAFKA-17454 Fix failed transactions_mixed_versions_test.py when running with 3.2 (#17067)
why https://github.com/apache/kafka/commit/df04887ba597941674a28d54bd35202bbd21631e does not fix it?
The fix of https://github.com/apache/kafka/commit/df04887ba597941674a28d54bd35202bbd21631e is to NOT collect the log from path `/mnt/kafka/kafka-operational-logs/debug/xxxx.log`if the task is successful. It does not change the log level. see ducktape https://github.com/confluentinc/ducktape/blob/b2ad7693f2750a2286a5099882ecc774fd7138b2/ducktape/tests/test.py#L181
why https://github.com/apache/kafka/commit/df04887ba597941674a28d54bd35202bbd21631e does not see the error of "sort"
https://github.com/apache/kafka/commit/df04887ba597941674a28d54bd35202bbd21631e does NOT show the error since the number of features is only "one" (only metadata.version). Hence, the bug is not triggered as it does not need to "sort". Now, we have two features - metadata.version and krafe.version - so the sort is executed and then we see the "hello bug"
why we should change the kafka.log_level to INFO?
the template of log4j.properties is controlled by `log_level` (https://github.com/apache/kafka/blob/trunk/tests/kafkatest/services/kafka/templates/log4j.properties#L16), and the bug happens in writing debug message (https://github.com/apache/kafka/blob/e4ca066680296ea29d443efb626baecc837083f6/core/src/main/scala/kafka/server/metadata/BrokerMetadataListener.scala#L274). Hence, changing the log level to DEBUG can avoid triggering the bug.
Reviewers: Justine Olshan <jo...@confluent.io>, Chia-Ping Tsai <ch...@gmail.com>
---
tests/kafkatest/tests/core/transactions_mixed_versions_test.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/kafkatest/tests/core/transactions_mixed_versions_test.py b/tests/kafkatest/tests/core/transactions_mixed_versions_test.py
index 77041b15d3b..a0f298b1fd4 100644
--- a/tests/kafkatest/tests/core/transactions_mixed_versions_test.py
+++ b/tests/kafkatest/tests/core/transactions_mixed_versions_test.py
@@ -199,6 +199,9 @@ class TransactionsMixedVersionsTest(Test):
self.kafka.logs["kafka_data_1"]["collect_default"] = True
self.kafka.logs["kafka_data_2"]["collect_default"] = True
self.kafka.logs["kafka_operational_logs_debug"]["collect_default"] = False if old_kafka_version == str(LATEST_3_2) else True
+ # The 3.2.3 release does not include KAFKA-14259, which will cause an exception when writing debug messages.
+ # Therefore, changing the log level to INFO can avoid triggering the bug.
+ self.kafka.log_level = "INFO" if old_kafka_version == str(LATEST_3_2) else "DEBUG"
self.setup_topics()
self.kafka.start()