This is an automated email from the ASF dual-hosted git repository. chia7712 pushed a commit to branch 3.9 in repository https://gitbox.apache.org/repos/asf/kafka.git
commit 14e1ebee9e79f9f5950bbc0a730442a6ff97c160 Author: TengYao Chi <[email protected]> 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 <[email protected]>, Chia-Ping Tsai <[email protected]> --- 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()
