You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Robert Bradshaw (JIRA)" <ji...@apache.org> on 2018/05/22 20:03:00 UTC

[jira] [Commented] (BEAM-2980) BagState.isEmpty needs a tighter spec

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

Robert Bradshaw commented on BEAM-2980:
---------------------------------------

This seems a bit more subtle. Given 

BagState<X> myBag = // empty
ReadableState<Boolean> isMyBagEmpty = myBag.isEmpty();
readResultBefore = myBag.read();
myBag.add(bizzle);
readResultAfter = myBag.read();
bool createBeforeReadAfter = isMyBagEmpty.read()

I think it makes a lot of sense for readResultAfter to contain bizzle, but the question is whether createBeforeReadAfter is True or False. 

> BagState.isEmpty needs a tighter spec
> -------------------------------------
>
>                 Key: BEAM-2980
>                 URL: https://issues.apache.org/jira/browse/BEAM-2980
>             Project: Beam
>          Issue Type: Bug
>          Components: beam-model
>            Reporter: Kenneth Knowles
>            Assignee: Daniel Mills
>            Priority: Major
>
> Consider the following:
> {code}
> BagState<X> myBag = // empty
> ReadableState<Boolean> isMyBagEmpty = myBag.isEmpty();
> myBag.add(bizzle);
> bool empty = isMyBagEmpty.read();
> {code}
> Should {{empty}} be true or false? We need a consistent answer, across all kinds of state, when snapshots are required.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)