You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2017/03/19 21:24:41 UTC
[jira] [Updated] (FLINK-6052) Potential null access in
ZooKeeperCompletedCheckpointStore#getLatestCheckpoint()
[ https://issues.apache.org/jira/browse/FLINK-6052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Yu updated FLINK-6052:
--------------------------
Description:
{code}
Tuple2<RetrievableStateHandle<CompletedCheckpoint>, String> checkpointStateHandle = checkpointStateHandles.peekLast();
try {
return retrieveCompletedCheckpoint(checkpointStateHandle);
} catch (Exception e) {
LOG.warn("Could not retrieve latest checkpoint. Removing it from " +
"the completed checkpoint store.", e);
try {
// remove the checkpoint with broken state handle
removeBrokenStateHandle(checkpointStateHandles.pollLast());
} catch (Exception removeException) {
{code}
The code should handle the case where peekLast() / pollLast() returns null.
was:
{code}
Tuple2<RetrievableStateHandle<CompletedCheckpoint>, String> checkpointStateHandle = checkpointStateHandles.peekLast();
try {
return retrieveCompletedCheckpoint(checkpointStateHandle);
} catch (Exception e) {
LOG.warn("Could not retrieve latest checkpoint. Removing it from " +
"the completed checkpoint store.", e);
try {
// remove the checkpoint with broken state handle
removeBrokenStateHandle(checkpointStateHandles.pollLast());
} catch (Exception removeException) {
{code}
The code should handle the case where peekLast() / pollLast() returns null.
> Potential null access in ZooKeeperCompletedCheckpointStore#getLatestCheckpoint()
> --------------------------------------------------------------------------------
>
> Key: FLINK-6052
> URL: https://issues.apache.org/jira/browse/FLINK-6052
> Project: Flink
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Minor
>
> {code}
> Tuple2<RetrievableStateHandle<CompletedCheckpoint>, String> checkpointStateHandle = checkpointStateHandles.peekLast();
> try {
> return retrieveCompletedCheckpoint(checkpointStateHandle);
> } catch (Exception e) {
> LOG.warn("Could not retrieve latest checkpoint. Removing it from " +
> "the completed checkpoint store.", e);
> try {
> // remove the checkpoint with broken state handle
> removeBrokenStateHandle(checkpointStateHandles.pollLast());
> } catch (Exception removeException) {
> {code}
> The code should handle the case where peekLast() / pollLast() returns null.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)