kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ismael Juma (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KAFKA-4395) KafkaConfig and LogConfig should not have static initialization order dependencies
Date Wed, 09 Nov 2016 18:19:58 GMT

     [ https://issues.apache.org/jira/browse/KAFKA-4395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ismael Juma updated KAFKA-4395:
-------------------------------
    Fix Version/s: 0.10.1.1

> 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.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)

Mime
View raw message