You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Yu Li (Jira)" <ji...@apache.org> on 2020/05/07 11:51:00 UTC

[jira] [Closed] (FLINK-16782) Avoid unnecessary check on expired time state when we set visibility as ReturnExpiredIfNotCleanedUp

     [ https://issues.apache.org/jira/browse/FLINK-16782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yu Li closed FLINK-16782.
-------------------------
    Resolution: Implemented

Merged into master via a7b2b5a6e771d05148eca75d8803601abfe68909

> 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)