You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (JIRA)" <ji...@apache.org> on 2019/06/29 13:40:00 UTC
[jira] [Closed] (FLINK-13004) Correct the logic of
needToCleanupState in KeyedProcessFunctionWithCleanupState
[ https://issues.apache.org/jira/browse/FLINK-13004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jark Wu closed FLINK-13004.
---------------------------
Resolution: Fixed
Fix Version/s: 1.9.0
Fixed in 1.9.0: 0640f97755f49b3331e8d81ca15dca0566a1890d
> Correct the logic of needToCleanupState in KeyedProcessFunctionWithCleanupState
> -------------------------------------------------------------------------------
>
> Key: FLINK-13004
> URL: https://issues.apache.org/jira/browse/FLINK-13004
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Reporter: Yun Tang
> Assignee: Yun Tang
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.9.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Current implementation of needToCleanupState in KeyedProcessFunctionWithCleanupState actually has potention bug:
> {code:java}
> protected Boolean needToCleanupState(Long timestamp) throws IOException {
> if (stateCleaningEnabled) {
> Long cleanupTime = cleanupTimeState.value();
> // check that the triggered timer is the last registered processing time timer.
> return null != cleanupTime && timestamp == cleanupTime;
> } else {
> return false;
> }
> }
> {code}
> Please note that it directly use "==" to judge whether *Long* type timestamp and cleanupTime equals. However, if that value is larger than 127L, the result would actually return false instead of wanted true.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)