[ https://issues.apache.org/jira/browse/FLINK-19011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17181981#comment-17181981 ]
Jiayi Liao commented on FLINK-19011: ------------------------------------ [~sewen] Mmm... probably you're right because we also find other problems caused by Union State like full gc on JobManager during failover. But I think the Union state is still useful in some cases. For example we store the watermark as a value state so that the job can recover with a correct watermark. I'd vote dropping this if we can find a better replacement of Union State. > Parallelize the restore operation in OperatorStateBackend > ---------------------------------------------------------- > > Key: FLINK-19011 > URL: https://issues.apache.org/jira/browse/FLINK-19011 > Project: Flink > Issue Type: Improvement > Components: Runtime / Checkpointing > Affects Versions: 1.11.1 > Reporter: Jiayi Liao > Priority: Major > > To restore the states, union state needs to read state handles produced by > all operators. And currently during the restore operation, Flink iterates the > state handles one by one, which could last tens of minutes if the magnitude > of state handles exceeds ten thousand. > To accelerate the process, I propose to parallelize the random reads on HDFS > and deserialization. We can create a runnable for each state handle and let > it return the metadata and deserialized data, which can be aggregated in main > thread. -- This message was sent by Atlassian Jira (v8.3.4#803005)