[ 
https://issues.apache.org/jira/browse/FLINK-16782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17067298#comment-17067298
 ] 

Jark Wu commented on FLINK-16782:
---------------------------------

+1 to this :)

> Avoid unnecessary check on expired time state when we set visibility as 
> ReturnExpiredIfNotCleanedUp
> ---------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-16782
>                 URL: https://issues.apache.org/jira/browse/FLINK-16782
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / State Backends
>    Affects Versions: 1.10.0
>            Reporter: Yun Tang
>            Assignee: Yun Tang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.11.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Current implementation of getting unexpired value would always check whether 
> this ttl value is expired first:
> {code:java}
> // code placeholder
> <V> V getUnexpired(TtlValue<V> ttlValue) {
>         return ttlValue == null || (expired(ttlValue) && !returnExpired) ? 
> null : ttlValue.getUserValue();
> }
> {code}
> However, this check could be avoided if we set return expired time, we could 
> improve the performance by check whether to \{{returnExpired}} first.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to