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

Kenneth Knowles commented on BEAM-2980:
---------------------------------------

I can dig that perspective, too. The issue hitting users is probably that 
"current" isn't as obvious to them.

Unfortunately I don't see a good transcript anywhere of the conversation 
between the options of "XYZState is always a changing view of an underlying ref 
cell" versus having a future-like API. It does see that the utility of 
readLater() is tied to a particular implementation strategy wherein local 
changes are buffered separately from whatever is read because of the hint.

TBH I just think futures are simpler. But I see that you'd need to refactor 
bits of the API, for prefetching hint methods to cause futures to be delivered 
elsewhere, versus imperative readLater() calls in the prefetch methods.

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

Reply via email to