weiyunqing created FLINK-13612:
----------------------------------
Summary: 高并发初始化FlinkKafkaProducer011时StateDescriptor加载报错NPE
Key: FLINK-13612
URL:
https://issues.apache.org/jira/browse/FLINK-13612 Project: Flink
Issue Type: Bug
Components: Connectors / Kafka
Affects Versions: 1.7.2, 1.6.4, 1.6.3, shaded-7.0
Reporter: weiyunqing
Fix For: 1.7.2, 1.6.4, 1.6.3, shaded-7.0
org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer011#NEXT_TRANSACTIONAL_ID_HINT_DESCRIPTOR
FlinkKafkaProducer011中的NEXT_TRANSACTIONAL_ID_HINT_DESCRIPTOR变量state使用了static修饰
在执行initializeSerializerUnlessSet方法的时候高并发情况下会出现NPE异常
java.lang.NullPointerException at org.apache.flink.api.common.state.StateDescriptor.initializeSerializerUnlessSet(StateDescriptor.java:264) at org.apache.flink.runtime.state.DefaultOperatorStateBackend.getListState(DefaultOperatorStateBackend.java:730) at org.apache.flink.runtime.state.DefaultOperatorStateBackend.getUnionListState(DefaultOperatorStateBackend.java:271) at org.apache.flink.streaming.connectors.kafka.FlinkKafkaProducer011.initializeState(FlinkKafkaProducer011.java:837) at org.apache.flink.streaming.util.functions.StreamingFunctionUtils.tryRestoreFunction(StreamingFunctionUtils.java:178) at org.apache.flink.streaming.util.functions.StreamingFunctionUtils.restoreFunctionState(StreamingFunctionUtils.java:160) at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.initializeState(AbstractUdfStreamOperator.java:96) at org.apache.flink.streaming.api.operators.AbstractStreamOperator.initializeState(AbstractStreamOperator.java:281) at org.apache.flink.streaming.runtime.tasks.StreamTask.initializeState(StreamTask.java:730) at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:295) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:720) at java.lang.Thread.run(Thread.java:748)
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)