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

Tzu-Li (Gordon) Tai closed FLINK-16311.
---------------------------------------
    Fix Version/s: statefun-1.1
       Resolution: Fixed

Merged to master via 64bf21835be12c86e01c5fdc6379c080c141b79a

> PersistedAppendingBuffer state primitive has incorrect contracts for view() 
> method
> ----------------------------------------------------------------------------------
>
>                 Key: FLINK-16311
>                 URL: https://issues.apache.org/jira/browse/FLINK-16311
>             Project: Flink
>          Issue Type: Bug
>          Components: Stateful Functions
>    Affects Versions: statefun-1.1
>            Reporter: Tzu-Li (Gordon) Tai
>            Assignee: Tzu-Li (Gordon) Tai
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: statefun-1.1
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The {{PersistedAppendingBuffer}} state primitive in Stateful Functions, 
> states that {{view()}} returns {{null}} if the buffer wasn't accessed before, 
> or after a {{clear()}}.
> This actually is not possible. The {{PersistedAppendingBuffer}} primitive is 
> based on Flink's {{ListState}} state handle, which always returns an empty 
> list if the elements of the list is empty, and never a {{null}}.
> This means that the {{PersistedAppendingBuffer}} won't be able to 
> differentiate the cases (e.g. if the state wasn't accessed or cleared v.s. an 
> empty buffer).
> We suggest to just change the contract so that 
> {{PersistedAppendingBuffer#view()}} follows the behavior of Flink's 
> {{ListState}} to never return null.



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

Reply via email to