You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Ismael Juma (JIRA)" <ji...@apache.org> on 2016/11/23 11:07:58 UTC
[jira] [Resolved] (KAFKA-4395) KafkaConfig and LogConfig should not
have static initialization order dependencies
[ https://issues.apache.org/jira/browse/KAFKA-4395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ismael Juma resolved KAFKA-4395.
--------------------------------
Resolution: Fixed
Fix Version/s: 0.10.2.0
Issue resolved by pull request 2120
[https://github.com/apache/kafka/pull/2120]
> KafkaConfig and LogConfig should not have static initialization order dependencies
> ----------------------------------------------------------------------------------
>
> Key: KAFKA-4395
> URL: https://issues.apache.org/jira/browse/KAFKA-4395
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 0.10.0.1
> Reporter: Sumant Tambe
> Assignee: Sumant Tambe
> Fix For: 0.10.2.0, 0.10.1.1
>
>
> LogConfig.configDef.serverDefaultConfigNames is not initialized properly in due to static initialization order dependencies between KafkaConfig and LogConfig. The map ends inserting null values, which are all string literals. Consider the following.
> 1. KafkaConfig begins initialization at first because KafkaServer constructor needs KafkaConfig.
> 2. at KafkaConfig.LogMessageFormatVersionProp it needs LogConfig.
> 3. LogConfig begins initialization
> 4. LogConfig.configDef begins initialization
> 5. .define(UncleanLeaderElectionEnableProp....) needs KafkaConfig.UncleanLeaderElectionEnableProp, which is defined below KafkaConfig.LogMessageFormatVersionProp so it's null
> 6. Can't start another initialization of KafkaConfig
> 7. So .define inserts null. This is applicable to all three MinInSyncReplicasProp, UncleanLeaderElectionEnableProp, and CompressionTypeProp
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)