You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Sihua Zhou (JIRA)" <ji...@apache.org> on 2018/03/19 11:43:00 UTC
[jira] [Created] (FLINK-9022) fix resource close in
`StreamTaskStateInitializerImpl.streamOperatorStateContext()`
Sihua Zhou created FLINK-9022:
---------------------------------
Summary: fix resource close in `StreamTaskStateInitializerImpl.streamOperatorStateContext()`
Key: FLINK-9022
URL: https://issues.apache.org/jira/browse/FLINK-9022
Project: Flink
Issue Type: Bug
Components: State Backends, Checkpointing
Affects Versions: 1.5.0
Reporter: Sihua Zhou
Assignee: Sihua Zhou
Fix For: 1.5.0
We have the following code in {{StreamTaskStateInitializerImpl.streamOperatorStateContext()}} which is incorrect:
{code}
{code} } catch (Exception ex) {
// cleanup if something went wrong before results got published.
if (streamTaskCloseableRegistry.unregisterCloseable(keyedStatedBackend)) {
IOUtils.closeQuietly(keyedStatedBackend);
}
if (streamTaskCloseableRegistry.unregisterCloseable(operatorStateBackend)) {
IOUtils.closeQuietly(keyedStatedBackend);
}
if (streamTaskCloseableRegistry.unregisterCloseable(rawKeyedStateInputs)) {
IOUtils.closeQuietly(rawKeyedStateInputs);
}
if (streamTaskCloseableRegistry.unregisterCloseable(rawOperatorStateInputs)) {
IOUtils.closeQuietly(rawOperatorStateInputs);
}
if (streamTaskCloseableRegistry.unregisterCloseable(rawOperatorStateInputs)) {
IOUtils.closeQuietly(rawOperatorStateInputs);
}
throw new Exception("Exception while creating StreamOperatorStateContext.", ex);
}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)